1. #1
    Sencha User
    Join Date
    Oct 2008
    Posts
    27
    Vote Rating
    0
    JAD1951 is on a distinguished road

      0  

    Default Unanswered: Problem with Date

    Unanswered: Problem with Date


    I have a date : d = Date {Sat Jun 17 2006 00:00:00 GMT+0200}
    But d.getUTCDate(); gives me 16. Why ?

    Best regards

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Try creating your date object using the Ext.Date parse method:
    http://docs.sencha.com/extjs/4.2.1/#...e-method-parse

    That method will allow you to specify the date format explicitly.

    doesn't work for me
    Code:
    var d = new Date ('Sat Jun 17 2006 00:00:00 GMT+0200');
    console.log(d.getUTCDate());
    works for me
    Code:
    var d = new Date ('Sat Jun 17 2006');
    console.log(d.getUTCDate());
    So, I wonder if it's just how it's natively parsing the date in the first place.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    568
    Answers
    58
    Vote Rating
    69
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      0  

    Default


    Quote Originally Posted by JAD1951 View Post
    I have a date : d = Date {Sat Jun 17 2006 00:00:00 GMT+0200}
    But d.getUTCDate(); gives me 16. Why ?
    Because the Earth is round and rotates about its own axis.
    I mean - midnight on +2h timezone is 2h before the GMT/UTC midnight.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Oh, there you go.
    Didn't realize that +0200 was before.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi