GithubHelp home page GithubHelp logo

isdefinitelyuser / php-datetime-format-cheatsheet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lavaxun/php-datetime-format-cheatsheet

1.0 0.0 0.0 120 KB

Quick reference for php date time format

License: MIT License

php-datetime-format-cheatsheet's Introduction

Datetime Format

Day Format Value/Example
d 01 through 31
D Mon through Sun
j 1 through 31
l (lowercase 'L') Sunday throguh Saturday
N 1 (Monday) to 7 (Sunday)
S st, nd, rd, th
w 0 (sunday) through 6 (Saturday)
z 0 through 365
Week Format Value/Example
W 42 (42nd week in year)
Month Format Value/Example
F January through December
m 01 through 12
M Jan through Dec
n 1 through 12
t 28 through 31
Year Format Value/Example
L 1 (leap year), 0 otherwise
o same as Y, except that it use week number to decide which year it falls onto
Y 1991, 2012, 2014, ...
y 91, 12, 14, ...
Time Format Value/Example
a am or pm
A AM or PM
B 000 through 999
g 1 through 12
G 0 through 23
h 01 through 12
H 01 through 23
i 00 throguh 59
u 123456 (microseconds)
Timezone Format Value/Example
e UTC, GMT, Atlantic/Azores
I (capital i) 1 (daylight), 0 otherwise
O +0200
P +02:00
T EST, MDT, ...
Z -43200 through 50400 (timezone offset)
Date/Time Format Value/Example
c 2004-02-12T15:19:21+00:00
r Thu, 21 Dec 2000 16:01:07 +0200
U seconds since Jan 1 1970 00:00:00 GMT

php-datetime-format-cheatsheet's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.