Skip to content

Commit 59b0f8b

Browse files
authored
Change to start.date().replace(day=1)
1 parent f434646 commit 59b0f8b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pvlib/iotools/bsrn.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ def get_bsrn(station, start, end, username, password,
162162
end = pd.to_datetime(end)
163163

164164
# Generate list files to download based on start/end (SSSMMYY.dat.gz)
165-
filenames = pd.date_range(start, end, freq='1MS')\
165+
filenames = pd.date_range(start.date().replace(day=1), end, freq='1MS')\
166+
166167
.strftime(f"{station}%m%y.dat.gz").tolist()
167168

168169
# Create FTP connection

pvlib/iotools/srml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def get_srml(station, start, end, filetype='PO', map_variables=True,
236236
end = pd.to_datetime(end)
237237

238238
# Generate list of months
239-
months = pd.date_range(start, end, freq='1MS')
239+
months = pd.date_range(start.date().replace(day=1), end, freq='1MS')
240240
months_str = months.strftime('%y%m')
241241

242242
# Generate list of filenames

0 commit comments

Comments
 (0)