From 2d6b75a796ed12acc8aecf427d2eda1ba9b53b7d Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 18 Aug 2014 11:46:36 -0400 Subject: [PATCH] luatz: Move `asctime` from timetable.lua to strftime.lua. It doesn't deserve to be a timetable method --- luatz/strftime.lua | 5 +++++ luatz/timetable.lua | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/luatz/strftime.lua b/luatz/strftime.lua index 0f6a26f..04208b8 100644 --- a/luatz/strftime.lua +++ b/luatz/strftime.lua @@ -198,6 +198,11 @@ local function strftime ( format_string , timetable ) end ) ) end +local function asctime ( timetable ) + return strftime ( "%c\n" , timetable ) +end + return { strftime = strftime ; + asctime = asctime ; } diff --git a/luatz/timetable.lua b/luatz/timetable.lua index 6cded31..318bb63 100644 --- a/luatz/timetable.lua +++ b/luatz/timetable.lua @@ -148,10 +148,6 @@ function timetable_methods:strftime ( format_string ) return strftime ( format_string , self ) end -function timetable_methods:asctime ( ) - return self:strftime ( "%c\n" ) -end - local timetable_mt = { __index = timetable_methods ; __tostring = timetable_methods.rfc_3339 ; -- 2.39.2