コード例 #1
0
        static DateFormatter Formatter()
        {
            DateFormatter formatter = Cache.Value;

            formatter.Reset();
            return(formatter);
        }
コード例 #2
0
        public long ConvertToTimeMillis(ICharSequence value)
        {
            DateTime?dateTime = DateFormatter.ParseHttpDate(value);

            if (dateTime == null)
            {
                throw new FormatException($"header can't be parsed into a Date: {value}");
            }
            return(dateTime.Value.Ticks / TimeSpan.TicksPerMillisecond);
        }