Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 6439e3e

Browse files
committed
Release 1.5.1
1 parent e711376 commit 6439e3e

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config = {
22
name = 'Raphael\'s Library',
3-
version = '1.5.0',
3+
version = '1.5.1',
44
windbot = '2.6.2',
55

66
files = {

dist/Raphael.lua

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
-- Raphael's Library v1.5.0
2-
-- Last Updated: 22/03/2015 - 20:53 UTC
1+
-- Raphael's Library v1.5.1
2+
-- Last Updated: 30/03/2015 - 14:52 UTC
33
-- Released for WindBot v2.6.2
44

5-
RAPHAEL_LIB = '1.5.0'
5+
RAPHAEL_LIB = '1.5.1'
66

77
--[[
8-
* Changelog v1.5.0
8+
* Changelog v1.5.1
99
*
10-
* - Added closebattlelist.
11-
* - Added a few more ITEMS_* constants.
12-
* - Minor fixes and improvements on Area class.
13-
* - Added and improved a shitload of table functions. (Gotta edit this before official release)
10+
* - Fixed typo on table.reverse.
11+
* - Fixed very rare issue with utctime().
1412
*
1513
--]]
1614

@@ -494,11 +492,18 @@ end
494492
* Returns the current time of day, in seconds, on UTC timezone.
495493
*
496494
* @since 0.1.0
495+
* @updated 1.5.1
497496
*
498497
* @returns {number} - UTC time of day in seconds
499498
--]]
500499
function utctime()
501-
return tosec(os.date('!%X'))
500+
local t = os.date('!%X')
501+
502+
-- Apparently os.date('!%X') returns the time with AM/PM appended on some
503+
-- computers; this ignores anything before and after the actual timestamp
504+
t = table.first(t:match('(%d%d:%d%d:%d%d)'))
505+
506+
return tosec(t)
502507
end
503508

504509
--[[
@@ -1853,6 +1858,7 @@ end
18531858
* Returns a copy of the table with the indexes reversed.
18541859
*
18551860
* @since 1.5.0
1861+
* @updated 1.5.1
18561862
*
18571863
* @param {table} self - The target table
18581864
*
@@ -1861,9 +1867,9 @@ end
18611867
function table.reverse(self)
18621868
local r = {}
18631869

1864-
for i, v in ipairs(self)
1870+
for i, v in ipairs(self) do
18651871
r[#self - i + 1] = v
1866-
do
1872+
end
18671873

18681874
return r
18691875
end

log/changelog-1.5.1.log

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* - Fixed typo on table.reverse.
2+
* - Fixed very rare issue with utctime().

0 commit comments

Comments
 (0)