Find Date Range in Python

Rajnilari2015
Posted by Rajnilari2015 under Python category on | Points: 40 | Views : 72
from System import *
from System.Collections.Generic import *
from System.Linq import *

class Program(object):
def Main(args):
initialDate = Convert.ToDateTime("8/16/2016")
dtRange = Program.GetDateRange(initialDate)
lastDt = Program.FormateDate(initialDate.AddDays(6))
#display
dtRange.ForEach()
Console.ReadKey()

Main = staticmethod(Main)

def GetDateRange(startDt):
dtList = List[str]()
Enumerable.Range(0, 7).ToList().ForEach()
return dtList

GetDateRange = staticmethod(GetDateRange)

def FormateDate(dt):
return dt.ToString("MM/dd/yyyy")

FormateDate = staticmethod(FormateDate)

Comments or Responses

Login to post response