@@ -122,12 +122,13 @@ datetime.datetime(2018, 8, 6, 12, 0)
122122You can also set a default timezone, by again using the config's ` now ` .
123123
124124``` python
125- >> > config = tfhConfig(now = datetime.datetime(2018 , 8 , 4 , 0 , 0 ), tzinfo = pytz.timezone(' US/Pacific' ))
125+ >> > config = tfhConfig(
126+ ... now = datetime.datetime(2018 , 8 , 4 ), tzinfo = pytz.timezone(' US/Pacific' ))
126127
127128>> > timefhuman(' Wed' , config = config)
128129datetime.datetime(2018 , 8 , 8 , 0 , 0 , tzinfo = pytz.timezone(' US/Pacific' ))
129130
130- >> > timefhuman(' Wed EST' , config = config) # timezone specified in the input takes precedence
131+ >> > timefhuman(' Wed EST' , config = config) # EST timezone in the input takes precedence
131132datetime.datetime(2018 , 8 , 8 , 0 , 0 , tzinfo = pytz.timezone(' US/Michigan' ))
132133```
133134
@@ -164,11 +165,11 @@ class tfhConfig:
164165 # Default to the next valid datetime or the previous one
165166 direction: Direction = Direction.next
166167
167- # Always produce datetime objects. If no date, use the current date. If no time, use midnight.
168+ # Always return datetime objects. If no date, use now. date() . If no time, use midnight.
168169 infer_datetimes: bool = True
169170
170- # The 'current' datetime, used if infer_datetimes is True
171- now: datetime = datetime.now()
171+ # The 'current' datetime, used if infer_datetimes is True. Defaults to datetime.now().
172+ now: datetime | None = None
172173
173174 # Return the matched text from the input string
174175 return_matched_text: bool = False
0 commit comments