-
Notifications
You must be signed in to change notification settings - Fork 1
/
Example.html
82 lines (71 loc) · 2.05 KB
/
Example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<html>
<head>
<title>Java Script Persian Date By Saeed Auditore</title>
<script type="text/javascript" src="addExt.js"></script>
<script type="text/javascript">
var d = new Date();
</script>
</head>
<body>
<h1 id="xx">Persian Date(Native Java Script)</h1>
<p>A native Javascript labrary to add support for persian date time</p>
<h2>Examples : </h2>
<pre>
var d = new Date();
d.getPDate();
<button type="button" onclick="alert(d.getPDate());">RUN</button>
----
d.getPDay();
<button type="button" onclick="alert(d.getPDay());">RUN</button>
----
d.getWeekOfYear();
<button type="button" onclick="alert(d.getWeekOfYear());">RUN</button>
----
d.getPFirstDateOfMonth();
<button type="button" onclick="alert(d.getPFirstDateOfMonth());">RUN</button>
----
</pre>
<pre>
<h2>All Methods : </h2>
setPFullYear = function(y, m, d)
setPMonth = function(m, d)
setPDate = function(d)
getPFullYear = function()
getPMonth = function()
getPDate = function()
getPDay = function()
settPUTCFullYear = function(y, m, d)
settPUTCMonth = function(m, d)
setPUTCDate = function(d)
getPUTCFullYear = function()
getPUTCMonth = function()
getPUTCMonth = function()
getPUTCDate = function()
getPUTCDay = function()
PdateFormat = function(format)
getPDayOfYear = function()
getWeekOfYear = function()
isKabiseYear = function()
getPFirstDayOfMonth = function()
getPLastDateOfMonth = function()
getPDaysInMonth = function()
getPFirstDateOfMonth = function()
<h2>Class Methods : </h2>
Date.PersianToGregorian = function(j_y, j_m, j_d)
Date.GregorianToPersian = function(g_y, g_m, g_d)
Date.PcheckDate = function(j_y, j_m, j_d)
Date.getPShortMonthName = function(month)
Date.getPMonthNumber = function(name)
Date.isPValid = function(y, m, d, h, i, s, ms)
Date.PparseDate = function(input, format, strict)
Date.getPFormatCode = function(character)
Date.PcreateFormat = function(format)
Date.PgetFormatCode = function(character)
</pre>
</body>
<script type="text/javascript">
d = new Date();
// alert(d.getPDate());
// document.getElementById("xx").innerHTML = Date.PmonthNames;
</script>
</html>