Index: openacs-4/packages/acs-templating/www/doc/widgets/date.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/date.adp,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/acs-templating/www/doc/widgets/date.adp 1 Dec 2015 11:18:03 -0000 1.2.2.2 +++ openacs-4/packages/acs-templating/www/doc/widgets/date.adp 5 Jul 2016 12:14:22 -0000 1.2.2.3 @@ -3,15 +3,17 @@ Templating System Widget Reference: Date

The Date Widget

+ +Templating System : Widget Reference : Date

Overview

The date widget provides a versatile HTML control for entering dates in a variety of formats. The widget operates in conjunction with various template::util::date functions in order -to validate and manipulate the user's input. Please see the +to validate and manipulate the user's input. Please see the demo pages for some examples of -the widget's behavior.

+the widget's behavior.

The Date Object

-

The widget's value is a Date object, defined in +

The widget's value is a Date object, defined in template::util::date. The date object stores 7 fields: the year, month, day, hours, minutes, seconds, and the format in which these values should be displayed. The function @@ -76,8 +78,8 @@ it is less than 69; otherwise, 1900 is added to the year.99 short_hoursYesYesThe hour, in 12-hour format. When mutating, the hour is always -assumed to be in the "a.m." range; the ampm field may -be used to change this.3 +assumed to be in the "a.m." range; the ampm +field may be used to change this.3 ampmYesYesThe meridian indicator: either am or pm. Can be used in conjunction with the @@ -100,14 +102,14 @@ dates, such as adding a day, comparing two dates, etc.(An integer representing the number of elapsed seconds) -

For example, the following code produces the tomorrow's date in -SQL:

+

For example, the following code produces the tomorrow's date +in SQL:

 
 # Create a blank date
 set today_date [template::util::date::create]
 
-# Get the tomorrow's date
+# Get the tomorrow's date
 set clock_value [clock scan "1 day" -base [clock seconds]]
 set tomorrow_date [template::util::date::set_property \
   clock $today_date $clock_value]
@@ -192,8 +194,8 @@
 step-minute_interval {0 59 5}
 
 -helpCauses the date widget to display a description of each date
-fragment widget showing the purpose of the widget, such as "Year"
-or "24-Hour"-help
+fragment widget showing the purpose of the widget, such as
+"Year" or "24-Hour"-help
 
 
 

Examples of various Date widgets can be found on the demo pages.