Ejemplo n.º 1
0
 public virtual DateTimeImmutable sub(DateInterval interval) => new DateTimeImmutable(_ctx, Time.Subtract(interval.AsTimeSpan()), TimeZone);
Ejemplo n.º 2
0
 public virtual DateTimeImmutable add(DateInterval interval) => new DateTimeImmutable(_ctx, Time.Add(interval.AsTimeSpan()), TimeZone);
Ejemplo n.º 3
0
 /// <summary>
 /// Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object.
 /// </summary>
 //[return: CastToFalse]
 public virtual DateTime sub(DateInterval interval)
 {
     Time = Time.Subtract(interval.AsTimeSpan());
     return(this);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object.
        /// </summary>
        /// <returns>Returns the <see cref="DateTime"/> object for method chaining or <c>FALSE</c> on failure.</returns>
        //[return: CastToFalse]
        public virtual DateTime add(DateInterval interval)
        {
            Time = Time.Add(interval.AsTimeSpan());

            return(this);
        }
Ejemplo n.º 5
0
 public DatePeriod(DateTimeInterface start, DateInterval interval, DateTimeInterface end, int options = 0)
 {
     __construct(start, interval, end, options);
 }
Ejemplo n.º 6
0
 public DatePeriod(DateTimeInterface start, DateInterval interval, int recurrences, int options = 0)
 {
     __construct(start, interval, recurrences, options);
 }