Results 1 to 3 of 3

Thread: DateWrapper

  1. #1
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744

    Default DateWrapper

    Code:
    	public void onModuleLoad() {
    
    		System.out.println(new DateWrapper(1900, 1, 1).asDate()); // return Wed Jan 31 22:53:32 BRT 1900
    		System.out.println(new DateWrapper(2100, 11, 31).asDate()); // return Fri Dec 31 00:00:00 BRST 2100
    
    	}
    if JAN equals 1 and DEC equals 11 ?????????

  2. #2
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744

    Default

    if use this in javascript

    Code:
    new Date(1900, 0, 1)
    return Mon Jan 01 1900 00:00:00 GMT-0200

    but in GXT return Sun Dec 31 22:53:32 BRT 1899

  3. #3
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744

    Default

    add this comment in javadoc..

    Allocates a Date object and initializes it so that it represents midnight, local time, at the beginning of the day specified by the year, month, and date arguments.

    Parameters:
    year - the year minus 1900.
    month - the month between 0-11.
    date - the day of the month between 1-31.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •