Custom Web Publishing Guide

Table Of Contents
Chapter 5
|
Developing FileMaker XSLT stylesheets 73
The functions in the following table use custom date formatting strings that specify a date and time format.
See the next section,
About the date and time format strings.
About the date and time format strings
The date and time formats are specified by date and time pattern strings. Within date and time pattern strings,
unquoted letters from ‘A to ‘Z’ and from ‘a’ to ‘z’ are interpreted as pattern letters representing the
components of a date or time string.
The following pattern letters are defined (all other characters from ‘A to ‘Z’ and from ‘a’ to ‘z’ are
reserved):
fmxslt:compare_time(String time1, String time2) number This function compares two time values. It returns a
negative number if time1 is before time2. It returns a
positive number if time1 is after time2. It returns a 0 if
time1 is identical to time2. Both times must be
specified in the “fm” time format.
fmxslt:compare_day(String day1, String day2) number This function compares two day values. It returns a
negative number if day1 is before day2. It returns a
positive number if day1 is after day2. It returns a 0 if
day1 is identical to day2. Both days must be specified
in the short day format.
Date, time, day extension function
Data type
returned Description
fmxslt:get_datetime(String dateFormat) string Returns the current date and time using the date and
time format strings.
fmxslt:convert_datetime(String oldFormat,
String newFormat, String date)
string Converts the specified date in the specified oldFormat
into the string according to the specified newFormat.
The oldFormat and newFormat strings must be
specified using the date and time format strings.
fmxslt:compare_datetime(String dateFormat1,
String dateFormat2, String date1, String date2)
number This function compares date1 and date2 by decoding
these dates according to respective date formats. It
returns a negative number if date1 is before date2. It
returns a positive number if date1 is after date2. It
returns a 0 if date1 is identical to date2. The
dateFormat1 and dateFormat2 strings must be
specified using the date and time format strings.
Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
Date, time, day extension function
Data type
returned Description