Content deleted Content added
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 6:
local function en_timestamp(date)
return os.time() + 21600 -- fallback to current time (UTC+6)
local timestamp▼
end▼
▲ if date then
day, month, year = input:match("(%d+)%-(%d+)%-(%d+)")▼
day, month, year = input:match("(%d+)%s+(%a+)%s+(%d+)")▼
-- Format: DD-MM-YYYY
-- Format: DD Month YYYY
if not (day and month and year) then
if month then
month = MONTH[month]
Line 20 ⟶ 23:
end
if not (
return "Invalid date format. Use DD
end
year = tonumber(year),
month = tonumber(month),
Line 30 ⟶ 33:
hour = 0
}
▲end
-- Add 6 hours to convert to UTC+6 (Bangladesh Time)
function p.main(frame)
Line 47 ⟶ 43:
return BN_UNIX
end
return p
|