Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update documentation with ISO week date options

  • Loading branch information...
commit 4fa10e56e53bdaa75dd8e749295e7ecfd9644b44 1 parent 53638a2
@felideon felideon authored felideon committed
Showing with 19 additions and 6 deletions.
  1. +13 −0 doc/local-time.texinfo
  2. +6 −6 src/local-time.lisp
View
13 doc/local-time.texinfo
@@ -545,6 +545,13 @@ The constant @var{+rfc-1123-format+} is bound to a description of the format def
@end defvr
+@itindex +iso-week-date-format+
+@defvr Constant +iso-week-date-format+
+
+The constant @var{+iso-week-date-format+} is bound to a description of the ISO 8601 Week Date format. An output with this format will look like this: @samp{2009-W53-5}.
+
+@end defvr
+
@itindex parse-timestring
@defun parse-timestring timestring &key (start 0) end (fail-on-error t) (offset 0)
@@ -587,6 +594,12 @@ FORMAT is a list containing one or more of strings, characters, and keywords. S
*microseconds
@item :nsec
*nanoseconds
+@item :iso-week-year
+*year for ISO week date (can be different from regular calendar year)
+@item :iso-week-number
+*ISO week number (i.e. 1 through 53)
+@item :iso-week-day
+*ISO compatible weekday number (i.e. monday=1, sunday=7)
@item :ordinal-day
day of month as an ordinal (e.g. 1st, 23rd)
@item :long-weekday
View
12 src/local-time.lisp
@@ -138,9 +138,6 @@
'((:year 4) #\- (:month 2) #\- (:day 2) #\T
(:hour 2) #\: (:min 2) #\: (:sec 2) #\.
(:usec 6) :gmt-offset-or-z))
-(defparameter +iso-week-date-format+
- ;; 2009-W53-5
- '((:iso-week-year 4) #\- #\W (:iso-week-number 2) #\- (:iso-week-day 1)))
(defparameter +rfc3339-format+
;; same as +ISO-8601-FORMAT+
'((:year 4) #\- (:month 2) #\- (:day 2) #\T
@@ -157,6 +154,9 @@
'(:short-weekday ", " (:day 2) #\space :short-month #\space (:year 4) #\space
(:hour 2) #\: (:min 2) #\: (:sec 2) #\space :timezone)
"Please note that you should use the +GMT-ZONE+ timezone to format a proper RFC 1123 timestring. See the RFC for the details about the possible values of the timezone field.")
+(defparameter +iso-week-date-format+
+ ;; 2009-W53-5
+ '((:iso-week-year 4) #\- #\W (:iso-week-number 2) #\- (:iso-week-day 1)))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter +rotated-month-days-without-leap-day+
@@ -1549,12 +1549,12 @@ FORMAT is a list containing one or more of strings, characters, and keywords. St
:MIN *minutes
:SEC *seconds
:WEEKDAY *numeric day of week starting from index 0, which means Sunday
- :ISO-WEEK-YEAR *year for ISO week date (can be different from regular calendar year)
- :ISO-WEEK-NUMBER *ISO week number 01 through 53 in certain cases
- :ISO-WEEK-DAY *ISO-compatible weekday number (monday=1, sunday=7)
:MSEC *milliseconds
:USEC *microseconds
:NSEC *nanoseconds
+ :ISO-WEEK-YEAR *year for ISO week date (can be different from regular calendar year)
+ :ISO-WEEK-NUMBER *ISO week number (i.e. 1 through 53)
+ :ISO-WEEK-DAY *ISO compatible weekday number (monday=1, sunday=7)
:LONG-WEEKDAY long form of weekday (e.g. Sunday, Monday)
:SHORT-WEEKDAY short form of weekday (e.g. Sun, Mon)
:LONG-MONTH long form of month (e.g. January, February)
Please sign in to comment.
Something went wrong with that request. Please try again.