Examples of dateFormValueForKey()


Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("0:08 PM, PDT", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 8, 0, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("K:mm a, z")));

    req.takeValueForKey("02001.July.04 AD 12:08 PM", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("yyyyy.MMMMM.dd GGG hh:mm aaa")));

    req.takeValueForKey("Wed, 4 Jul 2001 12:08:56 -0700", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z")));

    req.takeValueForKey("010704120856-0700", "str");
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("02001.July.04 AD 12:08 PM", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("yyyyy.MMMMM.dd GGG hh:mm aaa")));

    req.takeValueForKey("Wed, 4 Jul 2001 12:08:56 -0700", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z")));

    req.takeValueForKey("010704120856-0700", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("yyMMddHHmmssZ")));

    req.takeValueForKey("2001-07-04T12:08:56.235-0700", "str");
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("Wed, 4 Jul 2001 12:08:56 -0700", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z")));

    req.takeValueForKey("010704120856-0700", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("yyMMddHHmmssZ")));

    req.takeValueForKey("2001-07-04T12:08:56.235-0700", "str");
    assertEquals(new NSTimestamp((new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt)).getTime() + 235), req.dateFormValueForKey("str", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")));
  }
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("010704120856-0700", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("yyMMddHHmmssZ")));

    req.takeValueForKey("2001-07-04T12:08:56.235-0700", "str");
    assertEquals(new NSTimestamp((new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt)).getTime() + 235), req.dateFormValueForKey("str", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")));
  }

  public void testNumericFormValueForKey() {

    WORequest req = new TestRequest();
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

  public void testDateFormValueForKey() {

    WORequest req = new TestRequest();

    req.takeValueForKey("2001.07.04 AD at 12:08:56 PDT", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z")));

    req.takeValueForKey("Wed, Jul 4, '01", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 0, 0, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("EEE, MMM d, ''yy")));

    req.takeValueForKey("12:08 PM", "str");
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("2001.07.04 AD at 12:08:56 PDT", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 56, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z")));

    req.takeValueForKey("Wed, Jul 4, '01", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 0, 0, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("EEE, MMM d, ''yy")));

    req.takeValueForKey("12:08 PM", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 8, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("h:mm a")));

    req.takeValueForKey("12 o'clock PM, Pacific Daylight Time", "str");
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("Wed, Jul 4, '01", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 0, 0, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("EEE, MMM d, ''yy")));

    req.takeValueForKey("12:08 PM", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 8, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("h:mm a")));

    req.takeValueForKey("12 o'clock PM, Pacific Daylight Time", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 0, 0, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("hh 'o''clock' a, zzzz")));

    req.takeValueForKey("0:08 PM, PDT", "str");
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("12:08 PM", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 8, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("h:mm a")));

    req.takeValueForKey("12 o'clock PM, Pacific Daylight Time", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 0, 0, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("hh 'o''clock' a, zzzz")));

    req.takeValueForKey("0:08 PM, PDT", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 8, 0, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("K:mm a, z")));

    req.takeValueForKey("02001.July.04 AD 12:08 PM", "str");
View Full Code Here

Examples of com.webobjects.appserver.WORequest.dateFormValueForKey()

    req.takeValueForKey("12 o'clock PM, Pacific Daylight Time", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 0, 0, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("hh 'o''clock' a, zzzz")));

    req.takeValueForKey("0:08 PM, PDT", "str");
    assertEquals(new NSTimestamp(1970, 1, 1, 12, 8, 0, pdt), req.dateFormValueForKey("str", new SimpleDateFormat("K:mm a, z")));

    req.takeValueForKey("02001.July.04 AD 12:08 PM", "str");
    assertEquals(new NSTimestamp(2001, 7, 4, 12, 8, 0, TimeZone.getDefault()), req.dateFormValueForKey("str", new SimpleDateFormat("yyyyy.MMMMM.dd GGG hh:mm aaa")));

    req.takeValueForKey("Wed, 4 Jul 2001 12:08:56 -0700", "str");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.