aboutsummaryrefslogtreecommitdiff
path: root/assets/manual/man/man3advtrains
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-08-10 09:57:15 +0200
committerY. Wang <yw05@forksworld.de>2022-08-10 09:57:15 +0200
commit4f9bd72a847ccec3b580def8a4ca2ee12e453477 (patch)
tree03d22fb205cfd4bf128e36a84ea94f43ac6267df /assets/manual/man/man3advtrains
parent5cc7f50bad779e4f4efb747a74bbce53a7e05cd3 (diff)
downloadadvtrains-4f9bd72a847ccec3b580def8a4ca2ee12e453477.tar.gz
advtrains-4f9bd72a847ccec3b580def8a4ca2ee12e453477.tar.bz2
advtrains-4f9bd72a847ccec3b580def8a4ca2ee12e453477.zip
Reformat RWT documentation as manual pages
Diffstat (limited to 'assets/manual/man/man3advtrains')
-rw-r--r--assets/manual/man/man3advtrains/rwt_add.3advtrains.md20
-rw-r--r--assets/manual/man/man3advtrains/rwt_copy.3advtrains.md28
-rw-r--r--assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md19
-rw-r--r--assets/manual/man/man3advtrains/rwt_now.3advtrains.md7
4 files changed, 74 insertions, 0 deletions
diff --git a/assets/manual/man/man3advtrains/rwt_add.3advtrains.md b/assets/manual/man/man3advtrains/rwt_add.3advtrains.md
new file mode 100644
index 0000000..ec73e9c
--- /dev/null
+++ b/assets/manual/man/man3advtrains/rwt_add.3advtrains.md
@@ -0,0 +1,20 @@
+% RWT_ADD(3ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`add`, `diff`, `sub` - Add or subtract railway time objects
+
+# SYNOPSIS
+
+* `add(t1, t2)`
+* `diff(t1, t2)`
+* `sub(t1, t2)`
+
+# DESCRIPTION
+
+* `add()` returns the result of adding `t1` and `t2`.
+* `diff()` returns the result of subtracting `t1` from `t2`.
+* `sub()` returns the result of subtracting `t2` from `t1`.
+
+# RETURN VALUE
+
+`add()` and `sub()` return their results as tables. `diff()` returns its result as a number.
diff --git a/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md b/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md
new file mode 100644
index 0000000..99dfaf1
--- /dev/null
+++ b/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md
@@ -0,0 +1,28 @@
+% RWT_COPY(3ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`copy`, `new`, `to_table`, `to_secs`, `to_string` - Create and copy railway time objects
+
+# SYNOPSIS
+
+* `copy(obj)`
+* `new(cycles, minutes, seconds)`
+* `to_table(obj)`
+* `to_secs(obj [, cycles])`
+* `to_string(obj [, no_cycles])`
+
+# DESCRIPTION
+
+* `copy()` returns a copy of `obj`.
+* `new()` creates a new railway time object with the given number of cycles, minutes, and seconds.
+* `to_table()`, `to_secs()`, and `to_string()` convert `obj` to a table, number, or string, respectively. If `cycles` is passed to `to_secs()`, that value is used as the number of cycles. If `no_cycles` is passed to `to_string()`, the number of cycles is set to zero.
+
+# RETURN VALUE
+
+* `copy()` returns the copy that is created. If `obj` is a table, the returned value is not identical to `obj`.
+* `new()` returns the newly created object as a table.
+* `to_table()`, `to_secs()`, `to_string()` returns the conveerted object.
+
+# NOTES
+
+`to_table()` returns `obj` if it is a table.
diff --git a/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md b/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md
new file mode 100644
index 0000000..0336820
--- /dev/null
+++ b/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md
@@ -0,0 +1,19 @@
+% RWT_LAST_RPT(3ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`last_rpt`, `next_rpt`, `time_from_last_rpt`, `time_to_next_rpt` - Calculate time for repeating events
+
+# SYNOPSIS
+
+* `last_rpt(time, interval, offset)`
+* `next_rpt(time, interval, offset)`
+* `time_from_last_rpt(interval, offset)`
+* `time_to_next_rpt(interval, offset)`
+
+# DESCRIPTOIN
+The functions described in this page calculates the time or time difference related to events scheduled to repeat with the given interval and at the given offset, in relation to the given time. Whether and when the event actually takes place is not relevant to the API.
+
+* `last_rpt()` returns the time at which the event was expected to occur the last time
+* `next_rpt()` returns the time at which the event is expected to occur the next time
+* `time_from_last_rpt()` returns the time since the event was expected to occur the last time
+* `time_to_next_rpt()` return the time until the event is expected to occur the next time
diff --git a/assets/manual/man/man3advtrains/rwt_now.3advtrains.md b/assets/manual/man/man3advtrains/rwt_now.3advtrains.md
new file mode 100644
index 0000000..0843b1f
--- /dev/null
+++ b/assets/manual/man/man3advtrains/rwt_now.3advtrains.md
@@ -0,0 +1,7 @@
+% RWT_NOW(3ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`now` - Get the current railway time
+
+# DESCRIPTION
+`now()` returns the current railway time as a table.