Skip to content

Commit bfe8a5c

Browse files
committed
Correct date_range in srml and bsrn
1 parent 2228d8b commit bfe8a5c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pvlib/iotools/bsrn.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ def get_bsrn(station, start, end, username, password,
159159
end = pd.to_datetime(end)
160160

161161
# Generate list files to download based on start/end (SSSMMYY.dat.gz)
162-
filenames = pd.date_range(
163-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1MS')\
162+
filenames = pd.date_range(start, end, freq='1MS')\
164163
.strftime(f"{station}%m%y.dat.gz").tolist()
165164

166165
# Create FTP connection

pvlib/iotools/srml.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +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(
240-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1MS')
239+
months = pd.date_range(start, end, freq='1MS')
241240
months_str = months.strftime('%y%m')
242241

243242
# Generate list of filenames

0 commit comments

Comments
 (0)