Document new cal-day procedures and add more tests.
This commit is contained in:
parent
420b096bea
commit
aa6a9ac705
2 changed files with 68 additions and 0 deletions
|
@ -333,6 +333,56 @@ Parses the string and returns a valid cal-day structure.
|
|||
Tries parsing the string as cal-day and returns the result upon
|
||||
success. Upon failure, parses the string as cal-month.
|
||||
|
||||
(cal-day=? a b)
|
||||
|
||||
* ```a``` - a cal-day value
|
||||
* ```b``` - a cal-day value
|
||||
|
||||
Returns ```#t``` if ```a``` respresents the same date as ```b``` in
|
||||
calendar.
|
||||
|
||||
(cal-day<? a b)
|
||||
|
||||
* ```a``` - a cal-day value
|
||||
* ```b``` - a cal-day value
|
||||
|
||||
Returns ```#t``` if ```a``` comes before ```b``` in calendar.
|
||||
|
||||
(cal-day<=? a b)
|
||||
|
||||
* ```a``` - a cal-day value
|
||||
* ```b``` - a cal-day value
|
||||
|
||||
Returns ```#t``` if ```a``` comes before or is the same date as
|
||||
```b``` in calendar.
|
||||
|
||||
(cal-day>=? a b)
|
||||
|
||||
* ```a``` - a cal-day value
|
||||
* ```b``` - a cal-day value
|
||||
|
||||
Returns ```#t``` if ```a``` comes after or is the same date as ```b```
|
||||
in calendar.
|
||||
|
||||
(cal-day>? a b)
|
||||
|
||||
Returns ```#t``` if ```a``` comes after ```b``` in calendar.
|
||||
|
||||
(cal-day/month<? a b)
|
||||
|
||||
* ```a``` - a cal-day or cal-month value
|
||||
* ```b``` - a cal-day or cal-month value
|
||||
|
||||
Returns ```#t``` if ```a``` and ```b``` are of the same type and
|
||||
```a``` comes before ```b``` in calendar. Raises error if the values
|
||||
are not of the same type.
|
||||
|
||||
(cal-day/month->string v)
|
||||
|
||||
* ```v``` - a cal-day or cal-month value
|
||||
|
||||
Returns appropriate string representation of given value.
|
||||
|
||||
### Format
|
||||
|
||||
(import cal-format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue