File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Original file line number Diff line number Diff line change
1
+ script "DateTime"
2
+ /*
3
+ Copyright (C) 2017 LiveCode Ltd.
4
+
5
+ This file is part of LiveCode.
6
+
7
+ LiveCode is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU General Public License v3 as published by the Free
9
+ Software Foundation.
10
+
11
+ LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
12
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
+ for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
18
+
19
+
20
+ constant kTwelveHours = 43200
21
+
22
+ on TestLongTime24Hours
23
+ local tSeconds
24
+ set the twelveHourTime to false
25
+ put the seconds into tSeconds
26
+ convert tSeconds to long time
27
+
28
+ TestAssert "Test 24-hour format 1" , char 1 to 2 of tSeconds is a number
29
+ TestAssert "Test 24-hour format 2" , char 3 of tSeconds is ":"
30
+
31
+ put the seconds + kTwelveHours into tSeconds
32
+ convert tSeconds to long time
33
+
34
+ TestAssert "Test 24-hour format 3" , char 1 to 2 of tSeconds is a number
35
+ TestAssert "Test 24-hour format 4" , char 3 of tSeconds is ":"
36
+ end TestLongTime24Hours
37
+
You can’t perform that action at this time.
0 commit comments