Home iWeb Logon Internet Meetings Contact Us Site Map

Z Programs

Z.time.text



Arguments:       A = time (HHMM or NNNNN*)
B = format indicator:  Use H, h, M, m, A, a, N
(Capital letter means keep lead zero; Small letter means don't)
(Use 'A' or 'a' for AM/PM.  'A' means use 'AM' or 'PM'; 'a' = 'A' or 'P')
(N means to return military time)
(All other characters are taken literally)

Examples:
                        09:10am  "H:MA"
                        9:10 a     "h:M a"
                        9:10 am   "h:M A"
                        0910 am  "HM A"
                        0910a      "HMa"
                        1530        "N"   (with input as 1530)

                 C = "C" to capitalize AM and PM
                    = "S" to use small letters for am and pm
                 D = 1 to indicate that argument A is internal time in seconds.

If A is NNNNN (seconds), it will be converted to HHMM *UNLESS* it looks
like HHMM already.  It is best to pass in HHMM time.  If you cannot,
pass in D=1 so that the program knows that the time is in internal form.
(i.e., 0000-2359 seconds is indistinguishable from 0000-2359 HHMM, except
where X%1>59;  however, note that 2359 seconds is only = 0039 HHMM, a small
time window).
DEFAULTS:
                  B = "h:MA"   \___  e.g., 9:10am
                  C = "S"      /

Example call: %Z.time.text(1300,"h:mmA","C") Returns “1:00PM”

Posted: August 03, 2001

Return to list of Z Programs