ACS DateTime Requirements
by
Ron Henderson
I. Introduction
This document describes the requirements for the ACS DateTime service package.
II. Vision Statement
ACS DateTime has the following primary functions:
- Allows applications to use a common set of procedures for
collecting date and time information from users.
- Provides utilities to convert and format date and time
information.
- Provides customizable form fragment widgets of varying degrees of
temporal granularity through which applications can collect date and time
information.
- Provides customizable calendar display widgets that allow
applications to hook calendar information into a flexible display
mechanism.
Note that most of this functionality has existed within the ACS for
a long time, but it has been spread over a combination of ACS and
module libraries. The ACS DateTime service packages brings these
procedures into a common framework and provides for a more consistent use of
formatting conventions.
Note that these procedures do not make any specific reference to
timezone information and do not provide for conversion between
timezones. This is left up to the application programmer. For
information on timezone conversions see the ACS Reference service
package and specifically the timezone reference pack therein.
III. System/Application Overview
This service packages consists of a set of Tcl widget libraries and
other procedures for processing date and time information. These
libraries are roughly separated into date-time and calendar
procedures.
IV. Use-cases and User-Scenarios
This package is only used as a procedural library for applications.
V. Related Links
None.
VI. Requirements
Date and Time functions
- Generate current system time (local or GMT)
- Generate current system date
- Format a calendar time (system-dependent representation of time)
using the formatting codes supported by the standard Unix time
functions
- Generate a list of standard month names
- Generate a list of standard month abbreviations
- Convert Julian time to ANSI time (yyyy-mm-dd)
- Convert ANSI time to "pretty ANSI time" (yyyy-mm-dd to Month day,
year)
- Generate a Tcl list of date-time elements (year, month, day, hour,
minute, second)
- Check the validity of a time interval by comparing start and end
times and determining if they represent a positive, empty, or negative
time range
Date and Time widgets
- Generate HTML select widgets for collecting date and time
information from users with varying granularity. Granularity should
be optional and specified in units of seconds, minutes, fives
(five minute intervals), quarters (fifteen minute intervals), halves
(thirty minute intervals), hours, days, or months
- Generate an HTML select widget for months of the year
- Generate an HTML select widget for general numeric ranges
Calendar widgets
All of the following allow the programmer to supply calendar
details in an ns_set
keyed on Julian date, and return an
HTML table.
- Generate a basic monthly calendar
- Generate a small monthly calendar
- Generate small monthly calendars centered in a given month
(previous, current, next)
- Generate a yearly calendar (composed of small monthly calendars)
given the starting month as a date
- Generate a yearly calendar based on calendar year (Jan to Dec),
given any date within that calendar year
- Generate a calendar navigation widget with viewing options for
day, week, month and year
ron@arsdigita.com