calendar - print calendar form

SYNOPSIS

<calendar $yr $month $day $hour $min ["am"|"pm" [$prefix [flags ...]]]>
<calendar $date [$prefix [flags ...]]>


DESCRIPTION
Note: The cal function (here) is more flexible and has more options than the calendar function.

The calendar function prints a calendar for the given month, as an HTML form that can be used to select a date and time.

In the first form, the year, month, day, hour and minute are given as integers. The months start from 1, and the hour is assumed to be 24-hour unless "am" or "pm" is given after the minute. In the second form, the date is given as a single field. It can be a Texis date field, or any string recognized by Texis as a date such as "now" or "-5 weeks".

The calendar is printed in an HTML TABLE, with form fields calyear, calmonth, calday, calhour and calmin. The calday field is a radio button for each day of the month. The variable name prefix can be changed by giving the $prefix parameter, which is the string to use instead of cal. This can be used to distinguish fields if multiple calendars are given in one form.

The following flags are recognized and can be given after the prefix:

  • "checkbox" Use checkboxes instead of radio buttons for the days.

  • "radio" Use radio buttons for the days (default).

  • "julian" Print Julian days (days into the year) instead of days of the month.

Upon submission of the form, the caldate function can be called to construct a list of Texis date values from the submitted values.


DIAGNOSTICS
calendar returns nothing.


EXAMPLE

<FORM METHOD=post ACTION=$url/action.html>
  Choose a day this month:
  <calendar "now">
  <INPUT TYPE=submit>
</FORM>


CAVEATS
The calendar function was added Oct. 4 1996.


SEE ALSO
caldate


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.