public CALDate DateAdvance(CALDate today, string periodrepr, string covrepr = "Following", bool endOfMonth = false) { Period period = PeriodParser.parse(periodrepr); BusinessDayConvention conv = Utilities.parseBizDayConv(covrepr); Date calDate = innerCal_.advance(today.innerDate_, period, conv, endOfMonth); return(new CALDate(calDate.serialNumber())); }
public void CanParseWithTime() { var period = PeriodParser.Parse("P1Y2M3DT4H5M6S"); Assert.Equal(1, period.Years); Assert.Equal(2, period.Months); Assert.Equal(3, period.Days); Assert.Equal(4, period.Hours); Assert.Equal(5, period.Minutes); Assert.Equal(6, period.Seconds); }
public void CanParseWithoutTime() { var period = PeriodParser.Parse("P1Y2M3D"); Assert.Equal(1, period.Years); Assert.Equal(2, period.Months); Assert.Equal(3, period.Days); Assert.Equal(0, period.Hours); Assert.Equal(0, period.Minutes); Assert.Equal(0, period.Seconds); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PeriodParser obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PeriodParser obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
public void CanParseEmpty() { var period = PeriodParser.Parse(string.Empty); Assert.Equal(Period.Zero, period); }
public virtual PeriodParser SetNext(PeriodParser next) { NextParser = next; return(next); }