[Chapel Merge] Deprecate undesirable DateTime methods

Branch: refs/heads/main
Revision: 9f2e40b
Author: daviditen
Link: Deprecate undesirable DateTime methods by daviditen · Pull Request #19934 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19934 from daviditen/deprecate-datetime-methods

Deprecate undesirable DateTime methods

[reviewed by @lydia-duncan]

We've decided to remove 'type datetime.today()', the "datetime - date" operator,
and 'type datetime.timeSinceEpoch():real'.

Equivalent replacements are: 'type datetime.now()', "datetime - new datetime(date, new time())", and
'timeSinceEpoch().totalSeconds(): timedelta' (a standalone function).

While there also deprecate/replace 'timedelta.total_seconds()'
with a camelCase version.

Added a new datetime initializer that takes a 'date' and 'time' argument. Added
a test of this initializer.

Added test/deprecated tests for everything that was deprecated.

Signed-off-by: David Iten daviditen@users.noreply.github.com

Modified Files:
A test/deprecated/datetimeMinusDate.chpl

A test/deprecated/datetimeMinusDate.good
A test/deprecated/datetimeTimeSinceEpoch.chpl
A test/deprecated/datetimeTimeSinceEpoch.good
A test/deprecated/datetimeToday.chpl
A test/deprecated/datetimeToday.good
A test/deprecated/timedelta_total_seconds.chpl
A test/deprecated/timedelta_total_seconds.good
A test/library/standard/DateTime/datetimeInitWithDateAndTime.chpl
A test/library/standard/DateTime/datetimeInitWithDateAndTime.good
M modules/standard/DateTime.chpl

Compare: https://github.com/chapel-lang/chapel/compare/3b2e1c65c86b...9f2e40b945d0