Exemple #1
0
        public static DateFromToDateViewModel ParseDates(string dateFrom,
                                                         string dateTo)
        {
            DateTime?DateFrom = null;
            DateTime?DateTo   = null;

            if (string.IsNullOrEmpty(dateFrom) == false)
            {
                DateFrom = MyGlobal.ParseIranianDate(dateFrom);
            }
            if (string.IsNullOrEmpty(dateTo) == false)
            {
                DateTo = MyGlobal.ParseIranianDate(dateTo).AddDays(1);
            }

            return(new DateFromToDateViewModel
            {
                DateFrom = DateFrom,
                DateTo = DateTo,
            });
        }
Exemple #2
0
 public static string GetTelegramChatId(string address)
 {
     return(MyGlobal.SplitAndGetRest(address, "t.me/"));
 }