New Issue: 'DateTime' module stabilization - C interop functions

18833, "aconsroe-hpe", "'DateTime' module stabilization - C interop functions", "2021-12-09T23:06:51Z"

As part of the module review for DateTime, we identified a list of methods that are closely tied to their C counterpart. With the intention of not locking in this behavior or constraining our implementation to always stay tied to C, we'd like to move, remove, rename, or mark as unstable.

One proposal might be to keep them in their current place (same module and as methods) with an added prefix c_, like we have for c_str on a string.

from to notes
date.timetuple date.c_timetuple returns a struct tm
datetime.timetuple datetime.c_timetuple returns a struct tm
datetime.strptime datetime.c_strptime parses a string as in strptime(3)
datetime.strftime datetime.c_strftime parses a string as in strftime(3)
date.ctime date.c_ctime gives the date as in ctime(3) eg "Wed Jun 30 00:00:00 1993\n"
datetime.ctime datetime.c_ctime gives the datetime as in ctime(3) eg "Wed Jun 30 21:49:08 1993\n"

This relates to:

  • Potential new home for struct tm: #18012
  • Potential new home for C interop: #18013