Ejemplo n.º 1
0
        public async Task <bool> CanAcceptCustomersAsync(DateTime dateTime)
        {
            if (!await IsOpenAsync(dateTime))
            {
                return(false);
            }

            DateTime  nowDateTime = DateTime.UtcNow.AddHours(ShopHours.UTC_to_PST_Hours);
            ShopHours nowHours    = new ShopHours(Hours);
            await nowHours.LoadAsync(this, nowDateTime);

            if (dateTime < nowDateTime)
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
        public async Task <DateTime> OpeningDateTimeAsync(DateTime dateTime)
        {
            await Hours.LoadAsync(this, dateTime);

            return(Hours.OpeningDateTime());
        }