-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cfm
More file actions
52 lines (49 loc) · 1002 Bytes
/
Copy pathtest.cfm
File metadata and controls
52 lines (49 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<cfset NLDate = new NLDate() />
<cfoutput>
<ul>
<li>
<strong>Right Now: #f(Now())#</strong>
</li>
<li>
Today: #f(NLDate.parse('today'))#
</li>
<li>
Tomorrow: #f(NLDate.parse('tomorrow'))#
</li>
<li>
Yesterday: #f(NLDate.parse('yesterday'))#
</li>
<li>
In an hour: #f(NLDate.parse('in an hour'))#
</li>
<li>
In 2 days: #f(NLDate.parse('in 2 days'))#
</li>
<li>
Last Week: #f(NLDate.parse('last week'))#
</li>
<li>
Two Weeks Ago: #f(NLDate.parse('two weeks ago'))#
</li>
<li>
Last Month: #f(NLDate.parse('last month'))#
</li>
<li>
A Couple Days Ago: #f(NLDate.parse('a couple days ago'))#
</li>
<li>
A Few Months Ago: #f(NLDate.parse('a few months ago'))#
</li>
<li>
Last Mar: #f(NLDate.parse('last mar'))#
</li>
<li>
Last March: #f(NLDate.parse('last march'))#
</li>
</ul>
</cfoutput>
<cfscript>
public string function f(Required Date Date) {
return dateFormat(arguments.Date,'long') & ' ' & timeFormat(arguments.Date,'long');
}
</cfscript>