Package org.haystack.tagval

Examples of org.haystack.tagval.HDate


        verifyEq(HCoord.make(s), c);
    }

    public void testRange() {
        HTimeZone ny = HTimeZone.make("New_York");
        HDate today = HDate.today();
        HDate yesterday = today.minusDays(1);
        HDate x = HDate.make(2011, 7, 4);
        HDate y = HDate.make(2011, 11, 4);
        HDateTime xa = HDateTime.make(x, HTime.make(2, 30), ny);
        HDateTime xb = HDateTime.make(x, HTime.make(22, 5), ny);

        verifyRange(HDateTimeRange.make("today", ny), today, today);
        verifyRange(HDateTimeRange.make("yesterday", ny), yesterday, yesterday);
View Full Code Here


        // setup test
        HDict kw = client.read("kw and not siteMeter");
        clearHisWrite(kw);

        // create some items
        HDate date = HDate.make(2010, 6, 7);
        HTimeZone tz = HTimeZone.make(kw.getStr("tz"));
        HHisItem[] write = new HHisItem[5];
        for (int i = 0; i < write.length; ++i) {
            HDateTime ts = HDateTime.make(date, HTime.make(i + 1, 0), tz);
            HVal val = HNum.make(i, "kW");
View Full Code Here

            }
        }
        double val = Double.parseDouble(s.toString());

        // HDate - check for dash
        HDate date = null;
        HTime time = null;
        int hour = -1;
        if (cur == '-') {
            int year;
            try {
View Full Code Here

TOP

Related Classes of org.haystack.tagval.HDate

Copyright © 2018 www.massapicom. 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.