Example usage for org.jfree.data.time Minute Minute

List of usage examples for org.jfree.data.time Minute Minute

Introduction

In this page you can find the example usage for org.jfree.data.time Minute Minute.

Prototype

public Minute(Date time, TimeZone zone, Locale locale) 

Source Link

Document

Constructs a new Minute, based on the supplied date/time and timezone.

Usage

From source file:org.jfree.data.time.MinuteTest.java

/**
 * In GMT, the 4.55pm on 21 Mar 2002 is java.util.Date(1016729700000L).
 * Use this to check the Minute constructor.
 *//*from  ww  w . j  ava2 s.co  m*/
@Test
public void testDateConstructor1() {
    TimeZone zone = TimeZone.getTimeZone("GMT");
    Locale locale = Locale.getDefault(); // locale should not matter here
    Minute m1 = new Minute(new Date(1016729699999L), zone, locale);
    Minute m2 = new Minute(new Date(1016729700000L), zone, locale);

    assertEquals(54, m1.getMinute());
    assertEquals(1016729699999L, m1.getLastMillisecond(zone));

    assertEquals(55, m2.getMinute());
    assertEquals(1016729700000L, m2.getFirstMillisecond(zone));
}

From source file:org.jfree.data.time.junit.MinuteTest.java

/**
 * In GMT, the 4.55pm on 21 Mar 2002 is java.util.Date(1016729700000L).
 * Use this to check the Minute constructor.
 *//*from  w w  w. j a  va  2s. c  om*/
public void testDateConstructor1() {
    TimeZone zone = TimeZone.getTimeZone("GMT");
    Locale locale = Locale.getDefault(); // locale should not matter here
    Calendar c = new GregorianCalendar(zone);
    Minute m1 = new Minute(new Date(1016729699999L), zone, locale);
    Minute m2 = new Minute(new Date(1016729700000L), zone, locale);

    assertEquals(54, m1.getMinute());
    assertEquals(1016729699999L, m1.getLastMillisecond(c));

    assertEquals(55, m2.getMinute());
    assertEquals(1016729700000L, m2.getFirstMillisecond(c));
}

From source file:org.jfree.data.time.MinuteTest.java

/**
 * In Singapore, the 4.55pm on 21 Mar 2002 is
 * java.util.Date(1,014,281,700,000L). Use this to check the Minute
 * constructor./*from  w  w w  .  j a v a2s  .  c  o  m*/
 */
@Test
public void testDateConstructor2() {
    TimeZone zone = TimeZone.getTimeZone("Asia/Singapore");
    Locale locale = Locale.getDefault(); // locale should not matter here
    Minute m1 = new Minute(new Date(1016700899999L), zone, locale);
    Minute m2 = new Minute(new Date(1016700900000L), zone, locale);

    assertEquals(54, m1.getMinute());
    assertEquals(1016700899999L, m1.getLastMillisecond(zone));

    assertEquals(55, m2.getMinute());
    assertEquals(1016700900000L, m2.getFirstMillisecond(zone));
}

From source file:org.jfree.data.time.junit.MinuteTest.java

/**
 * In Singapore, the 4.55pm on 21 Mar 2002 is
 * java.util.Date(1,014,281,700,000L). Use this to check the Minute
 * constructor./*from  w  ww .  j a v a 2  s .c  om*/
 */
public void testDateConstructor2() {
    TimeZone zone = TimeZone.getTimeZone("Asia/Singapore");
    Locale locale = Locale.getDefault(); // locale should not matter here
    Calendar c = new GregorianCalendar(zone);
    Minute m1 = new Minute(new Date(1016700899999L), zone, locale);
    Minute m2 = new Minute(new Date(1016700900000L), zone, locale);

    assertEquals(54, m1.getMinute());
    assertEquals(1016700899999L, m1.getLastMillisecond(c));

    assertEquals(55, m2.getMinute());
    assertEquals(1016700900000L, m2.getFirstMillisecond(c));
}