Skip to content

Commit

Permalink
fix(designday): Use Date object for DesignDay
Browse files Browse the repository at this point in the history
I realized that the only reason why I was requesting separate inputs for month and day_of_month was because I originally wrote this class before we had Date objects in the dt module. So this commit is replacing these two inputs with a Date object and this should be less prone to errors (like invalid dates).
  • Loading branch information
chriswmackey authored and Chris Mackey committed Jan 8, 2020
1 parent 2c68a3b commit 54cfb9c
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 144 deletions.
5 changes: 3 additions & 2 deletions ladybug/analysisperiod.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,16 @@ def end_time(self):

@property
def datetimes(self):
"""A sorted list of datetimes in this analysis period."""
"""A sorted list of hourly datetimes in this analysis period."""
if self._timestamps_data is None:
self._calculate_timestamps()
return tuple(DateTime.from_moy(moy, self.is_leap_year)
for moy in self._timestamps_data)

@property
def moys(self):
"""A sorted list of minutes of year in this analysis period as integers."""
"""A sorted list of hourly minutes of year in this analysis period as integers.
"""
if self._timestamps_data is None:
self._calculate_timestamps()
return self._timestamps_data
Expand Down
Loading

0 comments on commit 54cfb9c

Please sign in to comment.