![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 9 Pomógł: 0 Dołączył: 11.02.2012 Ostrzeżenie: (0%) ![]() ![]() |
Witam mam problem ze skryptem daty, wyswietla mi date miesiac wczesniejsza niz jest. nie wiem w czym tkwi problem. Z gory dzieki za pomoc.
CODE function data(){ var Today = new Date(); var Month = Today.getMonth(); var Day = Today.getDate(); var Year = Today.getFullYear(); if(Year <= 99) Year += 1900 var dat = ((Day < 10) ? "0" : ":") + Day; dat += ((Month < 10) ? "-0" : ":") + Month; dat += ("-") + Year; document.getElementById('data').innerHTML='<span style="color: red;">' + dat + '</span>'; } |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 226 Pomógł: 25 Dołączył: 22.05.2011 Ostrzeżenie: (0%) ![]() ![]() |
Cytat JavaScript getMonth() Method
Definition and Usage The getMonth() method returns the month (from 0 to 11) for the specified date, according to local time. Note: January is 0, February is 1, and so on. Ten post edytował 404 12.02.2012, 14:34:17 |
|
|
![]() ![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 9 Pomógł: 0 Dołączył: 11.02.2012 Ostrzeżenie: (0%) ![]() ![]() |
Dzieki wielkie za pomoc
![]() ![]() Pozdrawiam |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 1 233 Pomógł: 87 Dołączył: 6.03.2009 Ostrzeżenie: (40%) ![]() ![]() |
Po co się tak męczyć?
https://raw.github.com/kvz/phpjs/master/fun...atetime/date.js |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 10:18 |