Exemple #1
0
 public Week(YearWeek yearWeek, string alias)
 {
     this.PartitionKey = yearWeek.ToString();
     this.RowKey       = alias;
     this.Year         = yearWeek.Year;
     this.WeekNumber   = yearWeek.Week;
     this.WeekEndDate  = DateUtilities.DateOfWeek(yearWeek);
     this.Alias        = alias;
 }
Exemple #2
0
        public void DateOfWeekTest()
        {
            var date = DateUtilities.DateOfWeek(2014, 52);

            Assert.AreEqual(new DateTime(2015, 1, 3), date);

            date = DateUtilities.DateOfWeek(2015, 1);
            Assert.AreEqual(new DateTime(2015, 1, 10), date);

            date = DateUtilities.DateOfWeek(2015, 51);
            Assert.AreEqual(new DateTime(2015, 12, 26), date);
        }
Exemple #3
0
 public void Put(int year, int week, string user, [FromBody] Week value)
 {
     Put(DateUtilities.DateOfWeek(year, week), user, value);
 }