:ﺩﺭﺍﺩ ﺩﻮﺟﻭ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺦﯾﺭﺎﺗ ﯼﺩﻭﺭﻭ ﺖﻣﺮﻓ ﻉﻮﻧ 3 ﯽﻠﮐ ﺭﻮﻃ ﻪﺑ
(ﯽﻠﻠﻤﻟﺍ ﻦﯿﺑ ﺩﺭﺍﺪﻧﺎﺘﺳﺍ) "2015-03-25"
"03/25/2015"
«2015 ﺱﺭﺎﻣ 25» ﺎﯾ «2015 ﺱﺭﺎﻣ 25»
.ﺪﻨﮐ ﯽﻣ ﯼﻭﺮﯿﭘ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺭﺩ ﻪﻧﺍﺮﯿﮕﺘﺨﺳ ﺩﺭﺍﺪﻧﺎﺘﺳﺍ ﮏﯾ ﺯﺍ ISO ﺖﻣﺮﻓ
ﺪﻨﺘﺴﯿﻧ ﺮﮕﯾﺩ ﯼﺎﻫ ﺖﻣﺮﻓ
ﺪﻨﮐ ﯽﻣ ﯽﺟﻭﺮﺧ ﻞﻣﺎﮐ ﺭﻮﻃ ﻪﺑ ﺍﺭ ﺎﻫ ﺦﯾﺭﺎﺗ (ﺽﺮﻓ ﺶﯿﭘ ﺭﻮﻃ ﻪﺑ) ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ،ﯼﺩﻭﺭﻭ ﺖﻣﺮﻓ ﺯﺍ ﻞﻘﺘ
ISO 8601 ﻭ ﺎﻣﺮﺧ ﺶﯾﺎﻤﻧ ﯼﺍﺮﺑ ﯽﻠﻠﻤﻟﺍ ﻦﯿﺑ ﺩﺭﺍﺪﻧﺎﺘﺳﺍ
:ﺖﺳﺍ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺦﯾﺭﺎﺗ ﯽﺤﯿﺟﺮﺗ ﺐﻟﺎﻗ ﺰﯿﻧ ISO 8601 (YYYY-MM-DD) ﻮﺤﻧ
const d = new Date("2015-03-25");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript ISO Dates</h2>
<p id="demo"></p>
<script>
const d = new Date("2015-03-25");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
ﻻﺎﺑ ﻪﺠﯿﺘﻧ ،ﺎﻤﺷ ﯽﻧﺎﻣﺯ ﻪﻘﻄﻨﻣ ﻪﺑ ﻪﺘﺴﺑ
.ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﺎﻤﺷ ﯽﻧﺎﻣﺯ ﻪﻘﻄﻨﻣ ﻪﺑ ﺖﺒﺴﻧ ﻩﺪﺷ ﻪﺒﺳﺎﺤﻣ ﺦ
:ﺖﺷﻮﻧ (YYYY-MM) ﺯﻭﺭ ﻦﯿﯿﻌﺗ ﻥﻭﺪﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ISO ﯼﺎﻫ ﺦﯾﺭﺎﺗ
const d = new Date("2015-03");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript ISO Dates</h2>
<p id="demo"></p>
<script>
const d = new Date("2015-03");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
.ﺩﺮﮐ ﺪﻫﺍﻮﺧ ﺕﻭﺎﻔﺘﻣ ﺱﺭﺎﻣ 01 ﻭ ﻪﯾﺭﻮﻓ 28 ﻦﯿﺑ ﺍﺭ ﻻﺎﺑ ﺞﯾﺎﺘﻧ ﯽﻧﺎﻣﺯ ﻖﻃﺎﻨﻣ
:(YYYY) ﺖﺷﻮﻧ ﺯﻭﺭ ﻭ ﻩﺎﻣ ﻥﻭﺪﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ISO ﯼﺎﻫ ﺦﯾﺭﺎﺗ
const d = new Date("2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript ISO Dates</h2>
<p id="demo"></p>
<script>
const d = new Date("2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
.ﺩﺍﺩ ﺪﻨﻫﺍﻮﺧ ﺮﯿﯿﻐﺗ 2015 ﻪﯾﻮﻧﺍﮊ 01 ﻭ 2014 ﺮﺒﻣﺎﺳﺩ 31 ﻦﯿﺑ ﺍﺭ ﻕﻮﻓ ﺞﯾﺎﺘﻧ ﯽﻧﺎﻣﺯ ﻖﻃﺎﻨﻣ
ﺩﺮﮐ ﻪﻓﺎﺿﺍ ﻪﯿﻧﺎﺛ ﻭ ﻪﻘﯿﻗﺩ ،ﺖﻋﺎﺳ ﺎﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ISO ﯼﺎﻫ ﺦﯾﺭﺎﺗ
const d = new Date("2015-03-25T12:00:00Z");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript ISO Dates</h2>
<p>Separate date and time with a capital T.</p>
<p>Indicate UTC time with a capital Z.</p>
<p id="demo"></p>
<script>
const d = new Date("2015-03-25T12:00:00Z");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
.ﺖﺳﺍ ﻩﺪﺷ ﺍﺪﺟ ﻢﻫ ﺯﺍ ﮒﺭﺰﺑ T ﺎﺑ ﻥﺎﻣﺯ ﻭ ﺦﯾﺭﺎﺗ
.ﺩﻮﺷ ﯽﻣ ﻒﯾﺮﻌﺗ Z ﮒﺭﺰﺑ ﻑﺮﺣ ﺎﺑ UTC ﻥﺎﻣﺯ
.ﺪﯿﻨﮐ ﻪﻓﺎﺿﺍ ﺍﺭ HH:MM- ﺎﯾ HH:MM+ ﻭ ﺪﯿﻨﮐ ﻑﺬﺣ ﺍﺭ Z ،ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ UTC ﻪﺑ ﺖﺒﺴﻧ ﺍﺭ ﻥﺎﻣﺯ ﺪﯿﻫﺍﻮ
const d = new Date("2015-03-25T12:00:00-06:30");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript ISO Dates</h2>
<p>Modify the time relative to UTC by adding +HH:MM or subtraction -HH:MM to the time.</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
new Date("2015-03-25T12:00:00-06:00");
</script>
</body>
</html>
UTC (ﯽﻧﺎﻬﺟ ﮓﻨﻫﺎﻤﻫ ﻥﺎﻣﺯ) ﻥﺎﻤﻫ GMT (ﭻﯾﻮﻨﯾﺮﮔ ﻥﺎﻣﺯ) ﺖﺳﺍ.
.ﺪﺷﺎﺑ ﻪﺘﺷﺍﺩ ﻒﻠﺘﺨﻣ ﯼﺎﻫﺮﮔﺭﻭﺮﻣ ﺭﺩ ﯽﺗﻭﺎﻔﺘﻣ ﺞﯾﺎﺘﻧ ﺪﻧﺍﻮﺗ ﯽﻣ ﻥﺎﻣﺯ-ﺦﯾﺭﺎﺗ ﻪﺘﺷﺭ ﺭﺩ Z ﺎﯾ T ﻑﺬﺣ
ﺩﺮﮐ ﺪﻫﺍﻮﺧ ﻩﺩﺎﻔﺘﺳﺍ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ،ﯽﻧﺎﻣﺯ ﻪﻘﻄﻨﻣ ﻦﯿﯿﻌﺗ ﻥﻭﺪﺑ ،ﺦﯾﺭﺎﺗ ﻢﯿﻈﻨﺗ ﻡﺎﮕﻨﻫ
ﺪﯾﺁ ﯽﻣ ﺖﺳﺩ ﻪﺑ ﻪﺠﯿﺘﻧ ،ﯽﻧﺎﻣﺯ ﻪﻘﻄﻨﻣ ﻦﯿﯿﻌﺗ ﻥﻭﺪﺑ ،ﺦﯾﺭﺎﺗ ﺖﻓﺎﯾﺭﺩ ﻡﺎﮕﻨﻫ
،ﺩﻮﺷ ﺩﺎﺠﯾﺍ (ﭻﯾﻮﻨﯾﺮﮔ ﻥﺎﻣﺯ) GMT ﺭﺩ ﻥﺎﻣﺯ/ﺦﯾﺭﺎﺗ ﺮﮔﺍ :ﺮﮕﯾﺩ ﺕﺭﺎﺒﻋ ﻪﺑ
:ﺪﻧﻮﺷ ﯽﻣ ﻪﺘﺷﻮﻧ ﻦﯾﺍ ﺪﻨﻧﺎﻣ "MM/DD/YYYY" ﺭﻮﺘﺳﺩ ﺎﺑ ﻩﺎﺗﻮﮐ ﯼﺎﻫ ﺦﯾﺭﺎﺗ
const d = new Date("03/25/2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p id="demo"></p>
<script>
const d = new Date("03/25/2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
:ﺪﻨﻨﮐ ﺩﺎﺠﯾﺍ ﺎﻄﺧ ﮏﯾ ﺖﺳﺍ ﻦﮑﻤﻣ ﻝﻭﺍ ﺮﻔﺻ ﻥﻭﺪﺑ ﺎﻫﺯﻭﺭ ﺎﯾ ﺎﻫ ﻩﺎﻣ ،ﺎﻫﺮﮔﺭﻭﺮﻣ ﺯﺍ ﯽﺧﺮﺑ ﺭﺩ
const d = new Date("2015-3-25");
ﺎﻫﺮﮔﺭﻭﺮﻣ ﺯﺍ ﯽﺧﺮﺑ
.ﺖﺳﺍ ﻩﺪﺸﻧ ﻒﯾﺮﻌﺗ "YYYY/MM/DD" ﺭﺎﺘﻓﺭ
const d = new Date("2015/03/25");
ﺎﻫﺮﮔﺭﻭﺮﻣ ﯽﺧﺮﺑ
.ﺖﺳﺍ ﻩﺪﺸﻧ ﻒﯾﺮﻌﺗ ﺰﯿﻧ «DD-MM-YYYY» ﺭﺎﺘﻓﺭ
const d = new Date("25-03-2015");
:ﺪﻧﻮﺷ ﯽﻣ ﻪﺘﺷﻮﻧ ﻦﯾﺍ ﺪﻨﻧﺎﻣ "MMM DD YYYY" ﺭﻮﺘﺳﺩ ﺎﺑ ﺐﻠﻏﺍ ﯽﻧﻻﻮﻃ ﯼﺎﻫ ﺦﯾﺭﺎﺗ
const d = new Date("Mar 25 2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p id="demo"></p>
<script>
const d = new Date("Mar 25 2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
:ﺪﺷﺎﺑ ﯽﺒﯿﺗﺮﺗ ﺮﻫ ﻪﺑ ﺪﻧﺍﻮﺗ ﯽﻣ ﺯﻭﺭ ﻭ ﻩﺎﻣ
const d = new Date("25 Mar 2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p id="demo"></p>
<script>
const d = new Date("25 Mar 2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
:ﺖﺷﻮﻧ (ﻥﺍﮊ) ﺭﺎﺼﺘﺧﺍ ﻪﺑ ﺎﯾ (ﻪﯾﻮﻧﺍﮊ) ﻞﻣﺎﮐ ﺭﻮﻃ ﻪﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ﻩﺎﻣ ﻭ
const d = new Date("January 25 2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p id="demo"></p>
<script>
const d = new Date("January 25 2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
const d = new Date("Jan 25 2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p id="demo"></p>
<script>
const d = new Date("Jan 25 2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
:ﺪﻨﺘﺴﻫ ﮏﭼﻮﮐ ﻭ ﮒﺭﺰﺑ ﻑﻭﺮﺣ ﻥﻭﺪﺑ ﺎﻫ ﻡﺎﻧ .ﺩﻮﺷ ﯽﻣ ﻪﺘﻓﺮﮔ ﻩﺪﯾﺩﺎﻧ ﺎﻣﺎﮐ
const d = new Date("JANUARY, 25, 2015");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript new Date()</h2>
<p id="demo"></p>
<script>
const d = new Date("JANUARY, 25, 2015");
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ <"code class="w3-codespan> ﺯﺍ ﺪﯿﻧﺍﻮﺗ ﯽﻣ ،ﺪﯾﺭﺍﺩ ﺮﺒﺘﻌﻣ ﺦﯾﺭﺎﺗ ﻪﺘﺷﺭ ﮏﯾ ﺮﮔﺍ
Date.parse()
ﯽﻣﺮﺑ ﺍﺭ ﻪﯾﻮﻧﺍﮊ ﻭ ﺦﯾﺭﺎﺗ ﻦﯿﺑ ﻪﯿﻧﺎﺛ ﯽﻠﯿﻣ ﺩ
let msec = Date.parse("March 21, 2012");
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Date.parse()</h2>
<p>Date.parse() returns the number of milliseconds between the date and January 1, 1970:</p>
<p id="demo"></p>
<script>
const msec = Date.parse("March 21, 2012");
document.getElementById("demo").innerHTML = msec;
</script>
</body>
</html>
:ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﺦﯾﺭﺎﺗ ءﯽﺷ ﮏﯾ ﻪﺑ ﻥﺁ ﻞﯾﺪﺒﺗ ﯼﺍﺮﺑ ﻪﯿﻧﺎﺛ ﯽﻠﯿﻣ ﺩﺍﺪﻌﺗ ﺯﺍ ﺪﯿﻧﺍ
let msec = Date.parse("March 21, 2012");
const d = new Date(msec);
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Date.parse()</h2>
<p>Date.parse(string) returns milliseconds.</p>
<p>You can use the return value to convert the string to a date object:</p>
<p id="demo"></p>
<script>
let msec = Date.parse("March 21, 2012");
const d = new Date(msec);
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
:ﺪﯿﻨﮐ ﻪﻌﺟﺍﺮﻣ ﺎﻣ ﻪﺑ ،ﺦﯾﺭﺎﺗ ﻞﻣﺎﮐ ﻊﺟﺮﻣ ﮏﯾ ﯼﺍﺮﺑ
.ﻞﻣﺎﮐ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺦﯾﺭﺎﺗ ﻊﺟﺮﻣ
ﻭ ﺦﯾﺭﺎﺗ ﯼﺎﻫ ﯽﮔﮋﯾﻭ ﻡﺎﻤﺗ ﺯﺍ ﯽﯾﺎﻫ ﻪﻧﻮﻤﻧ ﻭ ﺕﺎﺤﯿﺿﻮﺗ ﯼﻭﺎﺣ ﻊﺟﺮﻣ