Examples of month()


Examples of org.jquantlib.time.Date.month()

        final Date today = Date.todaysDate();
        System.out.println("Today's date is = "+today);

        //Get the Month enum and the month's integer equivalent of this date
        final Month month = today.month();
        final int integerEquivalentOfMonth = today.month().value();
        System.out.println("The month of today's date is = "+month);
        System.out.println("The integer equivalent of this month as obtained from the date is = "+integerEquivalentOfMonth);
        System.out.println("The integer equivalent of the date as obtained from the Month is also = "+month.value());

        //Get the weekday
View Full Code Here

Examples of org.jquantlib.time.Date.month()

    @Test
    public void isoDates() {
        QL.info("Testing ISO dates...");
        final String input_date = "2006-01-15";
        final Date d = DateParser.parseISO(input_date);
        if ((d.dayOfMonth() != 15) || (d.month() != Month.January) || (d.year() != 2006)) {
            fail("Iso date failed\n"
                    + " input date:    " + input_date + "\n"
                    + " day of month:  " + d.dayOfMonth() + "\n"
                    + " month:         " + d.month() + "\n"
                    + " year:          " + d.year());
View Full Code Here

Examples of org.jquantlib.time.Date.month()

        final Date d = DateParser.parseISO(input_date);
        if ((d.dayOfMonth() != 15) || (d.month() != Month.January) || (d.year() != 2006)) {
            fail("Iso date failed\n"
                    + " input date:    " + input_date + "\n"
                    + " day of month:  " + d.dayOfMonth() + "\n"
                    + " month:         " + d.month() + "\n"
                    + " year:          " + d.year());
        }
    }

    @Test
View Full Code Here

Examples of org.jquantlib.time.Date.month()

          jqlDate = new Date(javaDate);

          // compare d,m,y
            boolean test = true;
            test &= ( jqlDate.year()          == jyear );
            test &= ( jqlDate.month().value() == jmonth + 1); //Java month is 0-11
            test &= ( jqlDate.dayOfMonth()    == jday );
            success &= test;

            if (!test) {
                QL.info(String.format("JQL Date = %s   :::   ISODate = %s", jqlDate.toString(), javaDate.toString()));
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.