Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8232af

Browse filesBrowse files
committed
[Bug 19469] Added tests
1 parent b686623 commit f8232af
Copy full SHA for f8232af

File tree

Expand file treeCollapse file tree

1 file changed

+37
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+37
-0
lines changed
+37Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.