Work on month documentation.
This commit is contained in:
parent
2511654350
commit
a17b59d241
2 changed files with 43 additions and 4 deletions
37
README.md
37
README.md
|
@ -96,6 +96,43 @@ Specific Support Modules
|
|||
|
||||
### Month
|
||||
|
||||
Module for handling months algebra to be used in period construction
|
||||
and matching.
|
||||
|
||||
(make-month y m)
|
||||
|
||||
* ```y``` - a number representing valid year
|
||||
* ```m``` - a number between 1 and 12 inclusive
|
||||
|
||||
Constructs a new month value with ```y``` number as the year component
|
||||
and ```m``` number as the month component.
|
||||
|
||||
(month-valid? m)
|
||||
|
||||
* ```m``` - constructed month value
|
||||
|
||||
Checks whether given value is structurally valid month value, the year
|
||||
is between 1000 and 9999 inclusive and the month is between 1 and 12
|
||||
inclusive. Returns boolean value.
|
||||
|
||||
(string->month s)
|
||||
|
||||
* ```s``` - a string in "YYYY-MM" format
|
||||
|
||||
Parses given string ```s``` as month and constructs a month value from
|
||||
the YYYY and MM components parsed. The resulting month value is
|
||||
returned only if it is valid. Otherwise #f is returned.
|
||||
|
||||
(month->string m)
|
||||
|
||||
* ```m``` - valid month value or ```#f```
|
||||
|
||||
Converts given month value to a string in ```"YYYY-MM"``` format.
|
||||
|
||||
If ```#f```, returns a special empty month result ```"____-__"```.
|
||||
|
||||
Raises an error if ```m``` is not a valid month.
|
||||
|
||||
### Period
|
||||
|
||||
### Primes
|
||||
|
|
10
bbstool.scm
10
bbstool.scm
|
@ -71,16 +71,18 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
|
||||
(-mn (nick) "Specify member by nick" (-member-nick- nick))
|
||||
(-pi () "Print information" (-action- 'print-info))
|
||||
(-stats (fname) "Get stats for all months"
|
||||
(-stats (file:gnuplot-data) "Get stats for all months"
|
||||
(-action- 'print-stats)
|
||||
(-fname- fname))
|
||||
(-month (month) "Specify current month"
|
||||
(*current-month* (string->month month)))
|
||||
(-fname- file:gnuplot-data))
|
||||
(-month (YYYY-MM) "Specify current month"
|
||||
(*current-month* (string->month YYYY-MM)))
|
||||
(-print () "Print given member file"
|
||||
(-action- 'print-member-file))
|
||||
(-tests () "Run self-tests upon startup" (-run-tests?- #t))
|
||||
(-idstats () "Returns information about available member ids" (-action- 'print-idstats))
|
||||
(-genid () "Generates random member id" (-action- 'genid))
|
||||
(-gencards (file:cards file:desfires) "Generates brmdoor-compatible card files"
|
||||
(print "TODO: " file:cards " " file:desfires))
|
||||
)
|
||||
|
||||
;; Run tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue