1clock_iso8601(n)              Date/Time Utilities             clock_iso8601(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       clock_iso8601 - Parsing ISO 8601 dates/times
9

SYNOPSIS

11       package require Tcl  8.5
12
13       package require clock::iso8601  ?0.1?
14
15       ::clock::iso8601 parse_date date options...
16
17       ::clock::iso8601 parse_time time options...
18
19______________________________________________________________________________
20

DESCRIPTION

22       This  package  provides  functionality  to parse dates and times in ISO
23       8601 format.
24
25       ::clock::iso8601 parse_date date options...
26              This command parses an ISO8601 date string in an unknown variant
27              and returns the given date/time in seconds since epoch.
28
29              The  acceptable  options are -base, -gmt, -locale, and -timezone
30              of the builtin command clock scan.
31
32       ::clock::iso8601 parse_time time options...
33              This command parses a full ISO8601 timestamp  string  (date  and
34              time)  in  an unknown variant and returns the given time in sec‐
35              onds since epoch.
36
37              The acceptable options are -base, -gmt, -locale,  and  -timezone
38              of the builtin command clock scan.
39

DATE FORMATS

41       The commands accept the following 23 date formats:
42
43
44              (year)-(month)-(day)
45              (year)(month)(day)
46              (year)-(day in year)
47              (year)(day in year)
48              (year in century)-(month)-(day)
49              (year)-(month)Day defaults to the 1st of the month
50              (year in century)(month)(day)
51              (year in century)-(day in year)
52              (year in century)(day in year)
53              --(month)-(day)Year defaults to the current year
54              --(month)(day)Year defaults to the current year
55              --(day in year)Year defaults to the current year
56              ---(day)          Year defaults to the current year, month to current month
57              (fiscal year)-W(week)-(wday)
58              (fiscal year)W(week)-(wday)
59              (fiscal year in century)-W(week)-(wday)
60              (fiscal year in century)W(week)(wday)
61              (fiscal year)-W(week)Weekday defaults to monday
62              (fiscal year)W(week)Weekday defaults to monday
63              -W(week)-(wday)Year defaults to current fiscal year
64              -W(week)(wday)Year defaults to current fiscal year
65              (wday)    Year defaults to current fiscal year, week to current week
66              (year)    Month defaults to january, day to 1st of the month
67
68       The possible parts/fields in the above, and their meanings, are:
69
70       year   Year with century, 4 digits
71
72       month  Month in year, 2 digits
73
74       day    Day in month, 2 digits.
75
76       year in century
77              Year without century, 2 digits
78
79       day in year
80              Day in year, 3 digits
81
82       fiscal year
83              ISO 8601 fiscal year with century, 4 digits
84
85       fiscal year in century
86              ISO 8601 fiscal year without century, 2 digits
87
88       week   ISO 8601 week number
89
90       wday   Week day, 1 digit, Monday (1) to Sunday (7,0)
91

BUGS, IDEAS, FEEDBACK

93       This  document,  and the package it describes, will undoubtedly contain
94       bugs  and  other  problems.   Please  report  such  in   the   category
95       clock::iso8601  of  the  Tcllib Trackers [http://core.tcl.tk/tcllib/re
96       portlist].  Please also report any ideas for enhancements you may  have
97       for either package and/or documentation.
98
99       When proposing code changes, please provide unified diffs, i.e the out‐
100       put of diff -u.
101
102       Note further that  attachments  are  strongly  preferred  over  inlined
103       patches.  Attachments  can  be  made  by  going to the Edit form of the
104       ticket immediately after its creation, and  then  using  the  left-most
105       button in the secondary navigation bar.
106

CATEGORY

108       Text processing
109
110
111
112tcllib                                0.1                     clock_iso8601(n)
Impressum