strftime

It formats a local time/date according to locale settings
Example

<?php
setlocale(LC_TIME, “C”);
echo strftime(“%A”);
?>

Below given are the the formats

%a,%A,%d,%e,%j,%u,%w,%U,%V,%W,%b,%B,%h,%m,%C,%g,%G,%y,%Y,%H,%I,%l,%M,%p,%P,%r,%R,%S,%T,%X,%z,%Z

Output

Wednesday

Share