Adding current-date
original commit: 009ae0588ecb4387b73dfe6d807c7b5a4e27e243
This commit is contained in:
parent
1f7868ea09
commit
4d0091213c
|
@ -6,6 +6,7 @@
|
||||||
racket/contract)
|
racket/contract)
|
||||||
|
|
||||||
(provide/contract
|
(provide/contract
|
||||||
|
[current-date (-> date?)]
|
||||||
[date->string ((date?) (boolean?) . ->* . string?)]
|
[date->string ((date?) (boolean?) . ->* . string?)]
|
||||||
[date-display-format (parameter/c (symbols 'american 'chinese 'german 'indian 'irish 'julian 'iso-8601 'rfc2822))]
|
[date-display-format (parameter/c (symbols 'american 'chinese 'german 'indian 'irish 'julian 'iso-8601 'rfc2822))]
|
||||||
[find-seconds ((integer-in 0 61)
|
[find-seconds ((integer-in 0 61)
|
||||||
|
@ -19,6 +20,9 @@
|
||||||
[date->julian/scalinger (date? . -> . exact-integer?)]
|
[date->julian/scalinger (date? . -> . exact-integer?)]
|
||||||
[julian/scalinger->string (exact-integer? . -> . string?)])
|
[julian/scalinger->string (exact-integer? . -> . string?)])
|
||||||
|
|
||||||
|
(define (current-date)
|
||||||
|
(seconds->date (current-seconds)))
|
||||||
|
|
||||||
;; Support for Julian calendar added by Shriram;
|
;; Support for Julian calendar added by Shriram;
|
||||||
;; current version only works until 2099 CE Gregorian
|
;; current version only works until 2099 CE Gregorian
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user