Tcl Library Source Code

Documentation
Login


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

NAME

clock_iso8601 - Parsing ISO 8601 dates/times

Table Of Contents

SYNOPSIS

package require Tcl 8.5
package require clock::iso8601 ?0.1?

::clock::iso8601 parse_date date options...
::clock::iso8601 parse_time time options...

DESCRIPTION

This package provides functionality to parse dates and times in ISO 8601 format.

Date formats

The commands accept the following 23 date formats:

(year)-(month)-(day)
(year)(month)(day)
(year)-(day in year)
(year)(day in year)
(year in century)-(month)-(day)
(year)-(month)			Day defaults to the 1st of the month
(year in century)(month)(day)
(year in century)-(day in year)
(year in century)(day in year)
--(month)-(day)			Year defaults to the current year
--(month)(day)			Year defaults to the current year
--(day in year)			Year defaults to the current year
---(day)  		        Year defaults to the current year, month to current month
(fiscal year)-W(week)-(wday)
(fiscal year)W(week)-(wday)
(fiscal year in century)-W(week)-(wday)
(fiscal year in century)W(week)(wday)
(fiscal year)-W(week)		Weekday defaults to monday
(fiscal year)W(week)		Weekday defaults to monday
-W(week)-(wday)			Year defaults to current fiscal year
-W(week)(wday)			Year defaults to current fiscal year
(wday)				Year defaults to current fiscal year, week to current week
(year)				Month defaults to january, day to 1st of the month

The possible parts/fields in the above, and their meanings, are:

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category clock::iso8601 of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, i.e the output of diff -u.

Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.

CATEGORY

Text processing