You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
geetools_VH/old/oldcodes/l8_calendar_dates.py

24 lines
434 B
Python

# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import pytz
import csv
import pandas as pd
au_tz = pytz.timezone('Australia/Sydney')
dt1 = datetime(2018, 4, 17, tzinfo= au_tz)
dt = []
dt.append(dt1)
for i in range(1,100):
dt1 = dt[i-1]
dt.append(dt1 + timedelta(days=16))
dtstr = [_.strftime('%d %b %Y') for _ in dt]
df = pd.DataFrame(dtstr)
df.to_csv('L7_NARRA_dates.csv', index=False, header=False)