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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue