Macromedia coldfusion 4.5-cfml language reference ユーザーズマニュアル

ページ / 608
456
CFML Language Reference 
LSParseDateTime
A locale-specific version of the ParseDateTime function, except that there is no option 
for POP date/time object parsing. Returns a date/time object. 
See also 
ParseDateTime
 and 
SetLocale
Syntax
LSParseDateTime(
date-time-string)
date-time-string
String being converted to date/time object. This string must be in a form that is 
readable in the current locale setting. By default the locale is set to English (US).
Usage
When passing a date/time value for the English (US) locale, the date-time string can be 
in any of the following forms:
Note that if you specify a year in the date, you should specify the full year.
If the date is formatted for a locale other than the English (US) locale, add or subtract 
the conversion time, depending on the locale. LSParseDateTime does not accept POP 
dates, nor does it have the capacity to convert dates to Greenwich Mean Time.
Years from 0 to 29 are interpreted as 21
st
 century values. Years 30 to 99 are interpreted 
as 20
th
 century values.
Examples
<!--- This shows LSParseDateTime --->
<HTML>
<HEAD>
<TITLE>LSParseDateTime Example</TITLE>
</HEAD>
<BODY>
<H3>LSParseDateTime Example</H3>
Date-Time Formats for the English (US) Locale
Date-Time Composition
Example
dd mmmm yyyy
"25 January 1999"
hh:mm:ss
"8:30:00"
hh:mm:ss
"20:30:00"
mmmm dd, yyyy hh:mm:ss
"January 25, 1999 8:30:00"
hh:mm:ss mmm. dd, yyyy
"8:30:00 Jan. 25, 1999"
m/dd/yyyy hh:mm:ss
"1/25/1999 8:30:00"