mirror of
https://github.com/TangentFoxy/lua-date.git
synced 2025-07-28 02:52:18 +00:00
added ldoc config file, and html-cleanup of help file
This commit is contained in:
7
config.ld
Normal file
7
config.ld
Normal file
@@ -0,0 +1,7 @@
|
||||
project='LuaDate'
|
||||
title='LuaDate; Date and time library'
|
||||
description='Module for date and time manipulation, with timezone, string parsing, timespan support'
|
||||
format='discount'
|
||||
file='./date.lua'
|
||||
dir='LDoc'
|
||||
readme='readme.md'
|
19
date.lua
19
date.lua
@@ -1,11 +1,10 @@
|
||||
--[[LuaDate version:2.1.0]]-------------------------------
|
||||
--[[------------------------------------------------------
|
||||
Copyright (C) 2006, by Jas Latrix (jastejada@yahoo.com)
|
||||
All Rights Deserved.
|
||||
use this code at your own risk!.
|
||||
keep out of reach of children.
|
||||
Copyright (C) 2013 update to Lua 5.2 by Thijs Schreijer
|
||||
--]]------------------------------------------------------
|
||||
---------------------------------------------------------------------------------------
|
||||
-- Module for date and time calculations
|
||||
--
|
||||
-- @copyright Version 2.1.0, Copyright (C) 2006, by Jas Latrix (jastejada@yahoo.com), All Rights Deserved. Use this code at your own risk!. Keep out of reach of children. Copyright (C) 2013 update to Lua 5.2 by Thijs Schreijer
|
||||
-- @name date
|
||||
-- @class module
|
||||
|
||||
--[[ CONSTANTS ]]--
|
||||
local HOURPERDAY = 24
|
||||
local MINPERHOUR = 60
|
||||
@@ -420,7 +419,9 @@
|
||||
self.daynum, self.dayfrc = dn + floor(df/TICKSPERDAY), mod(df, TICKSPERDAY)
|
||||
return (dn >= DAYNUM_MIN and dn <= DAYNUM_MAX) and self or error("date beyond imposed limits:"..self)
|
||||
end
|
||||
|
||||
--- Gets the date from a date object.
|
||||
-- @return 3 return values; year, month, day
|
||||
-- @example local y, m, d = MyDate:getdate()
|
||||
function dobj:getdate() local y, m, d = breakdaynum(self.daynum) return y, m+1, d end
|
||||
function dobj:gettime() return breakdayfrc(self.dayfrc) end
|
||||
|
||||
|
3991
doc/index_cleaned.html
Normal file
3991
doc/index_cleaned.html
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user