Exemplo n.º 1
0
 public static string GenerateWeekTimex(DateObject monday = default(DateObject))
 {
     if (monday.IsDefaultValue())
     {
         return($"{Constants.TimexFuzzyYear}{Constants.DateTimexConnector}{Constants.TimexFuzzyWeek}");
     }
     else
     {
         return(FormatUtil.ToIsoWeekTimex(monday));
     }
 }
Exemplo n.º 2
0
 public static string GenerateWeekendTimex(DateObject date = default(DateObject))
 {
     if (date.IsDefaultValue())
     {
         return($"{Constants.TimexFuzzyYear}{Constants.DateTimexConnector}{Constants.TimexFuzzyWeek}{Constants.DateTimexConnector}{Constants.TimexWeekend}");
     }
     else
     {
         return($"{FormatUtil.ToIsoWeekTimex(date)}{Constants.DateTimexConnector}{Constants.TimexWeekend}");
     }
 }
Exemplo n.º 3
0
 public static string GenerateWeekTimex(DateObject monday = default(DateObject))
 {
     if (monday == default(DateObject))
     {
         return("XXXX-WXX");
     }
     else
     {
         return(FormatUtil.ToIsoWeekTimex(monday));
     }
 }
Exemplo n.º 4
0
        internal void ResolveWeekOf(Dictionary <string, object> resolutionDic, string keyName)
        {
            if (resolutionDic.ContainsKey(keyName))
            {
                var resolution = (Dictionary <string, string>)resolutionDic[keyName];

                var monday = DateObject.Parse(resolution["start"]);
                resolution[Constants.TimexKey] = FormatUtil.ToIsoWeekTimex(monday);

                resolutionDic.Remove(keyName);
                resolutionDic.Add(keyName, resolution);
            }
        }