summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/http/protocol/date.luadoc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-29 16:26:15 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-29 16:26:46 +0100
commit84346cd178ca0740817edc6f81d8f90e7bc6e00c (patch)
treedd8f6dbb041a2813ac5d91571cdac0b3dc004f1a /modules/luci-base/luasrc/http/protocol/date.luadoc
parentcf7e2695cc676dff02561a1a45d6de8140170b17 (diff)
Move inline documentation into separate files.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/luasrc/http/protocol/date.luadoc')
-rw-r--r--modules/luci-base/luasrc/http/protocol/date.luadoc46
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/http/protocol/date.luadoc b/modules/luci-base/luasrc/http/protocol/date.luadoc
new file mode 100644
index 000000000..d6f1c8d65
--- /dev/null
+++ b/modules/luci-base/luasrc/http/protocol/date.luadoc
@@ -0,0 +1,46 @@
+---[[
+LuCI http protocol implementation - date helper class.
+
+This class contains functions to parse, compare and format http dates.
+]]
+module "luci.http.protocol.date"
+
+---[[
+Return the time offset in seconds between the UTC and given time zone.
+
+@class function
+@name tz_offset
+@param tz Symbolic or numeric timezone specifier
+@return Time offset to UTC in seconds
+]]
+
+---[[
+Parse given HTTP date string and convert it to unix epoch time.
+
+@class function
+@name to_unix
+@param data String containing the date
+@return Unix epoch time
+]]
+
+---[[
+Convert the given unix epoch time to valid HTTP date string.
+
+@class function
+@name to_http
+@param time Unix epoch time
+@return String containing the formatted date
+]]
+
+---[[
+Compare two dates which can either be unix epoch times or HTTP date strings.
+
+@class function
+@name compare
+@param d1 The first date or epoch time to compare
+@param d2 The first date or epoch time to compare
+@return -1 - if d1 is lower then d2
+@return 0 - if both dates are equal
+@return 1 - if d1 is higher then d2
+]]
+