コード例 #1
0
ファイル: SupportDateTime.cs プロジェクト: ikvm/nesper
        public static SupportDateTime Make(string key, string datestr)
        {
            SupportDateTime bean = Make(datestr);

            bean.Key = key;
            return(bean);
        }
コード例 #2
0
        public static SupportTimeStartEndA Make(String key, String datestr, long duration)
        {
            if (datestr == null)
            {
                return(new SupportTimeStartEndA(key, null, null, null, null, null, null));
            }
            // expected : 2002-05-30T09:00:00.000
            long start = DateTimeParser.ParseDefaultMSec(datestr);
            long end   = start + duration;

            return(new SupportTimeStartEndA(key, start, SupportDateTime.ToDate(start), SupportDateTime.ToCalendar(start),
                                            end, SupportDateTime.ToDate(end), SupportDateTime.ToCalendar(end)));
        }