Ejemplo n.º 1
0
 public static DateTime GetDateFromTokens(TokenOrdinal ordinal, TokenDayOfWeek day, TokenTime time)
 {
     DateTime theDate = GetDateFromTokens(ordinal, day);
     return theDate + (TimeSpan) time.Value;
 }
Ejemplo n.º 2
0
 public static DateTime GetDateFromTokens(TokenDayOfWeek day, TokenTime time)
 {
     DateTime theDate = (DateTime) day.Value;
     return new DateTime(theDate.Year, theDate.Month, theDate.Day, 0, 0, 0) + (TimeSpan)time.Value;
 }
Ejemplo n.º 3
0
 public static DateTime GetDateFromTokens(TokenRelativeTemporalOrdinal day, TokenTime time)
 {
     DateTime theDate = (DateTime)day.Value;
     return new DateTime(theDate.Year, theDate.Month, theDate.Day, 0, 0, 0) + (TimeSpan)time.Value;
 }
Ejemplo n.º 4
0
        public static TokenIndeterminateSeries GetIndeterminateSeriesFromTokens(TokenEach each, TokenOther other, TokenDayOfWeek dow, TokenTime time)
        {
            var startDate = DateTime.Today;
            var theDateTime = (TimeSpan)time.Value;

            var series = new TokenIndeterminateSeries
            {
                Interval = 2,
                IntervalType = TokenIndeterminateSeries.SeriesIntervalType.DayOfWeek,
                StartDate = startDate + theDateTime,
                Value = dow
            };
            return series;
        }
Ejemplo n.º 5
0
        public static TokenIndeterminateSeries GetIndeterminateSeriesFromTokens(TokenEach each, TokenOrdinal ordinal, TokenTime time)
        {
            var startDate = DateTime.Today;
            var theDateTime = (TimeSpan)time.Value;

            var series = new TokenIndeterminateSeries
            {
                Interval = 1,
                IntervalType = TokenIndeterminateSeries.SeriesIntervalType.DayOfMonth,
                StartDate = startDate + theDateTime,
                Value = ordinal.Value
            };
            return series;
        }
Ejemplo n.º 6
0
 public static DateTime GetDateFromTokens(TokenTime time)
 {
     return DateTime.Today + (TimeSpan)time.Value;
 }
Ejemplo n.º 7
0
 public static DateTime GetDateFromTokens(TokenMonth month, TokenOrdinal day, TokenTime time)
 {
     return new DateTime(DateTime.Now.Year, (int)month.Value, (int)day.Value) + (TimeSpan)time.Value;
 }
Ejemplo n.º 8
0
 public static DateTime GetDateFromTokens(TokenOrdinal ordinal, TokenDayOfWeek day, TokenMonth month, TokenTime time)
 {
     return GetDateFromTokens(ordinal, day, month) + (TimeSpan) time.Value;
 }