Describe the feature
Consider updating str and repr to more helpful strings, for use in e.g. logging / error messages.
e.g. currently:
p = Period.of_years(1).with_month_offset(9).with_hour_offset(9)
str(p) gives 'P1Y'
repr(p) gives 'P1Y+9MT9H[]'
Would be useful if str also gave the offset.
Also It has been mentioned that a "human readable" description of a Period object could be useful - e.g. for use in logging and error messages.
e.g.
"P1D" = "1 day" or "Daily" or something...
"P6M" = "6 months"
"P1Y+9M9H" = "1 year + 9 months, 9 hours" ... or "UK Water Year"...
Investigate how feasible this is and implement a property of the Period class.
Motivation
More helpful represneation of period objects
Alternatives considered
No response
Additional context
https://jira.ceh.ac.uk/browse/FPM-291
https://jira.ceh.ac.uk/browse/FPM-538
Describe the feature
Consider updating str and repr to more helpful strings, for use in e.g. logging / error messages.
e.g. currently:
p = Period.of_years(1).with_month_offset(9).with_hour_offset(9)
str(p) gives 'P1Y'
repr(p) gives 'P1Y+9MT9H[]'
Would be useful if str also gave the offset.
Also It has been mentioned that a "human readable" description of a Period object could be useful - e.g. for use in logging and error messages.
e.g.
"P1D" = "1 day" or "Daily" or something...
"P6M" = "6 months"
"P1Y+9M9H" = "1 year + 9 months, 9 hours" ... or "UK Water Year"...
Investigate how feasible this is and implement a property of the Period class.
Motivation
More helpful represneation of period objects
Alternatives considered
No response
Additional context
https://jira.ceh.ac.uk/browse/FPM-291
https://jira.ceh.ac.uk/browse/FPM-538