anatoly techtonik <techto...@gmail.com> added the comment: On Sat, Jun 5, 2010 at 7:00 PM, Alexander Belopolsky <rep...@bugs.python.org> wrote: > On Sat, Jun 5, 2010 at 11:35 AM, anatoly techtonik > <rep...@bugs.python.org> wrote: > .. >> s/datetime/date\/time/ in the last sentence, as the complication comes from: >> -- start offtopic -- >> 1. the vast amount of various date and time modules/functions > > "Vast" is a bit of overstatement. It is mostly the datetime and time > module with a little bit in a less used calendar module.
"Concise" Python datetime module API =) (without any way to get current UTC offset from operating system) ------------------- datetime.MINYEAR datetime.MAXYEAR class datetime.date class datetime.time class datetime.datetime class datetime.timedelta class datetime.tzinfo timedelta.min timedelta.max timedelta.resolution classmethod date.today() classmethod date.fromtimestamp() classmethod date.fromordinal() date.min date.max date.resolution date.year date.month date.day date.replace() date.timetuple() date.toordinal() date.weekday() date.isoweekday() date.isocalendar() date.isoformat() date.__str__() date.ctime() date.strftime(format) classmethod datetime.today() classmethod datetime.now() classmethod datetime.utcnow() classmethod datetime.fromtimestamp() classmethod datetime.utcfromtimestamp() classmethod datetime.fromordinal() classmethod datetime.combine() classmethod datetime.strptime() datetime.min datetime.max datetime.resolution datetime.year datetime.month datetime.day datetime.hour datetime.minute datetime.second datetime.microsecond datetime.tzinfo datetime.date() datetime.time() datetime.timetz() datetime.replace() datetime.astimezone() datetime.utcoffset() datetime.dst() datetime.tzname() datetime.timetuple() datetime.utctimetuple() datetime.toordinal() datetime.weekday() datetime.isoweekday() datetime.isocalendar() datetime.isoformat() datetime.__str__() datetime.ctime() datetime.strftime() time.min time.max time.resolution time.hour time.minute time.second time.microsecond time.tzinfo time.replace() time.isoformat() time.__str__() time.strftime() time.utcoffset() time.dst() time.tzname() tzinfo.utcoffset() tzinfo.dst() tzinfo.tzname() tzinfo.fromutc() Raw doc with stripped markup is only 58161 bytes. Perhaps the biggest problem that you need to read out the doc thoroughly to understand that all UTC related stuff starts to work only when somebody writes a tzinfo module. It is like "you are developer, so its your headache when you get this data - we gave you The API". =) > Can you be more specific? The biggest omission, IMO, is the lack of > time zone support, but this is being worked on. See issue5094. Great, but it is Python 3.2 and I will be using 2.x Python for the next two years at least. It is not an only about omission - it is also about ineffective and somehow bloated unpythonic C API that is not well suited for everyday tasks. >> I still hardly believe that there is no way to get current TZ offset given >> that every OS provides such information. > > See issue1647654. Too long, and I've a little bit tired, and will be pretty busy next week, but thanks for the pointers. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7584> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com