Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5869 > unrolled thread

maybe useful : datetime conversion

Started byStef Mientki <stef.mientki@gmail.com>
First post2011-05-20 20:27 +0200
Last post2011-05-20 20:27 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  maybe useful : datetime conversion Stef Mientki <stef.mientki@gmail.com> - 2011-05-20 20:27 +0200

#5869 — maybe useful : datetime conversion

FromStef Mientki <stef.mientki@gmail.com>
Date2011-05-20 20:27 +0200
Subjectmaybe useful : datetime conversion
Message-ID<mailman.1851.1305916080.9059.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

hello,

using datetimes from a lot of different sources,
in many languages,
I had about 30 python helper routines,
which I now packed in one class,
much simpler.
Although I used the Delphi date-format as the base,
it shouldn't be difficult to rewrite the class for another type.

The input can be one of the following types :
  - None            : the current date-time is used
  - 30000.9         : a Delphi datetime
  - 30000           : a Delphi datetime
  - "30000.9"       : a Delphi datetime as a string
  - "30000,9"       : a Delphi datetime as a (Dutch) string
  - "20-5-11"              : short year notation
  - "20-05-2011"           : long year notation
  - "2009-09-24 10:12:24"  : Access string
  - datetime.datetime ( 2011, 1, 15 )
  - time.struct_time
  - wx.DateTime
  - time.time()  (through method from_time)

Maybe someone can use it.

cheers,
Stef


[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web