From: daurnimator Date: Sun, 24 Nov 2013 10:43:02 +0000 (-0500) Subject: luatz/tzinfo: Give tt_info objects a __tostring X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/b7645320a1905587b16a8b2035481bbd45788175?ds=sidebyside;hp=27e12c9a39aa33f8815964adedd036cd6703099f luatz/tzinfo: Give tt_info objects a __tostring --- diff --git a/luatz/tzinfo.lua b/luatz/tzinfo.lua index 77d0656..5b7c0c0 100644 --- a/luatz/tzinfo.lua +++ b/luatz/tzinfo.lua @@ -5,6 +5,9 @@ local tz_info_mt = { __index = tz_info_methods ; } local tt_info_mt = { + __tostring = function ( self ) + return string.format ( "tt_info:%s=%d" , self.abbr , self.gmtoff ) + end ; } -- Binary search