epochToFormatted

converts epoch to custom readable string

Syntax

epochToFormatted(epoch, format)

Returns

returns (string) the time in requested format

Parameters

epoch (integer)
the time
format (string)
using the format described below. example; "%A %B %d %Y"

Usage

Formatted escape codes;

a is replaced by the locale's abbreviated weekday name.
A is replaced by the locale's full weekday name.
b is replaced by the locale's abbreviated month name.
B is replaced by the locale's full month name.
c is replaced by the locale's appropriate date and time representation.
d is replaced by the day of the month as a decimal number [01,31].
H is replaced by the hour (24-hour clock) as a decimal number [00,23].
I is replaced by the hour (12-hour clock) as a decimal number [01,12].
j is replaced by the day of the year as a decimal number [001,366].
m is replaced by the month as a decimal number [01,12].
M is replaced by the minute as a decimal number [00,59].
p is replaced by the locale's equivalent of either a.m. or p.m.
S is replaced by the second as a decimal number [00,60].
U is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number [00,53].
w is replaced by the weekday as a decimal number [0,6], with 0 representing Sunday.
W is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0.
x is replaced by the locale's appropriate date representation.
X is replaced by the locale's appropriate time representation.
y is replaced by the year without century as a decimal number [00,99].
Y is replaced by the year with century as a decimal number.
Z is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists.
%% is replaced by %.