Look through the list of strftime() formats I linked to and see if anything
fits your needs. For example, the rest of WeeWX uses %x and %X.

On Sat, Mar 11, 2023 at 11:40 AM michael.k...@gmx.at <
michael.kainzba...@gmx.at> wrote:

> That was kind of what I intended to do, but while for $week using "%A" may
> be OK, using "%m/%d%Y", won't fit in many localizations. Is there a default
> format for date without time that I should reference or should I just add
> such the format for the sums setting to each lang file?
>
> Tom Keffer schrieb am Freitag, 10. März 2023 um 22:18:12 UTC+1:
>
>> Yes, the query is not as optimal as it could be. It's returning the right
>> date, but the time at which maximum rainfall was achieved, rather than
>> midnight.
>>
>> You can solve your problem by applying a formatting. For example,
>>
>> *$week.rain.maxsumtime.format("%A"), $month.rain.maxsumtime("%m/%d/%Y),
>> ...*
>>
>>
>> The formatting is from Python's strftime() function
>> <https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior>
>> .
>>
>> On Fri, Mar 10, 2023 at 6:03 AM michael.k...@gmx.at <michael.k...@gmx.at>
>> wrote:
>>
>>> When I calculate "maxsum" as the maximum daily rain sum per
>>> week/month/year/alltime, I am a bit confused by the output when it comes to
>>> formatting the date/time for the value.
>>>
>>> For me, having a time for a maximum daily sum doesn't make sense in this
>>> context.
>>>
>>> So, How can I solve this? I couldn't find out so far, if I can specifiy
>>> a special time format for aggregations like "maxsum"
>>>
>>> In the template I use $week.rain.maxsumtime, $month.rain.maxsumtime,
>>> $year.rain.maxsumtime, $alltime.rain.maxsumtime. The used format makes
>>> sense for max, min, maxmin, minmax, but not for a sum.
>>>
>>> How can I make the web page show "Wednesday" for "This week",
>>> "03/08/2023" for "This month, etc, without the hh:mm:ss added?
>>>
>>> [image: 2023-03-10 14_48_03-The weather in Test - Brave.png]
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/beb4ca00-11f5-4758-bb89-17aec6b2a956n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/beb4ca00-11f5-4758-bb89-17aec6b2a956n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/0271fd51-a86b-40e7-a242-4eb2661b166an%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/0271fd51-a86b-40e7-a242-4eb2661b166an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zECkmF%2BeueD9YaSxYsxHyyb1m36iKcwAnhz2MTUwdKEyFA%40mail.gmail.com.

Reply via email to