From 7bc6005f0878a5a881c083dc7acecb964b034e1a Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 30 Aug 2013 14:28:10 -0400 Subject: [PATCH] src/timetable: Add clone method --- src/timetable.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/timetable.lua b/src/timetable.lua index a5d0cc7..8801623 100644 --- a/src/timetable.lua +++ b/src/timetable.lua @@ -179,6 +179,10 @@ local function new_timetable ( year , month , day , hour , min , sec , yday , wd } end +function timetable_methods:clone ( ) + return new_timetable ( unpack_tm ( self ) ) +end + local function new_from_timestamp ( ts ) return new_timetable ( 1970 , 1 , 1 , 0 , 0 , ts ) end -- 2.39.5