Tag Archives: php

[PHP] Paparkan Masa

Paparkan Masa menggunakan PHP

Maklumat syntax adalah seperti berikut:

- A = Uppercase 12hr time syntax eg. PM
- a = Lowercase 12hr time syntax eg. pm
- D = Day eg. Fri
- d = Day eg. 03
- F = Full Text Month eg. January
- G = Hours in 24 hour format without leading zeros eg. 17
- g = Hours in 12 hour format without leading zeros eg. 7
- H = Hours in 24 hour format with leading zeros eg. 17
- h = Hours in 12 hour format with leading zeros eg. 07
- i = Minutes eg. 29
- M = Month eg. Jan
- m = Month eg. 01
- O = GMT time difference in hours eg. +0400
- S = Day of month suffix eg. st, nd, rd, or th.
- s = Seconds eg. 28
- T = Timezone setting eg. GMT, PST, EST, etc
- t = Total number of days in the month eg. 28, 31, etc.
- U = Seconds since the UNIX epoch eg. 1041604168
- W = Week number in year eg. 42 (42nd week in the year)
- w = numeric representation of the day eg. 1 = monday, 2 = tuesday, etc.
- Y = Year eg. 2003
- y = Year eg. 03
- z = Day of the year eg. 002

Contoh penggunaannya:

[cc lang="php"]
- March 10, 2001, 5:16 pm[/cc]
[cc lang="php"]
- 03.10.01[/cc]
[cc lang="php"]
- 10, 3, 2001[/cc]
[cc lang="php"]
- Sat Mar 10 15:16:08 PST 2001[/cc]
[cc lang="php"]
- 17:16:17[/cc]
[cc lang="php"]
- It is the 10th day.[/cc]

final dh dekat!!aaaaaaaaaaaa….