Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 17, 2011 22:52:59

Christophe P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Dates BC


On Jan 17, 2011, at 2:00 PM, Ben Dembroski wrote:
> I'm a relative newbie to both Python and Django, and in the middle of
> my first Django project. My client is asking me to store and process
> dates -- including dates BC.

Unless you have a strong need to do date arithmetic on the dates, or you can
use a different database (like PostgreSQL) that has more robust date support,
it might be easier to represent the dates as stylized strings, or as integers
on a uniform calendar like the proleptic Julian calendar, instead of using the
built-in date type.

--
-- Christophe Pettus
x...@thebuild.com

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 18, 2011 10:18:07

Ben D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Dates BC


Thanks. I do need to do some basic date arithmetic, but it doesn't
really need to be super accurate. I might be able to get away with
this approach.

Thanks for the advice!

Best,
Ben

On Jan 17, 10:52 pm, Christophe Pettus <x...@thebuild.com> wrote:
> On Jan 17, 2011, at 2:00 PM, Ben Dembroski wrote:
>
> > I'm a relative newbie to both Python and Django, and in the middle of
> > my first Django project.   My client is asking me to store and process
> > dates -- including dates BC.
>
> Unless you have a strong need to do date arithmetic on the dates, or you can
> use a different database (like PostgreSQL) that has more robust date support,
> it might be easier to represent the dates as stylized strings, or as integers
> on a uniform calendar like the proleptic Julian calendar, instead of using
> the built-in date type.
>
> --
> -- Christophe Pettus
>    x...@thebuild.com

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 18, 2011 11:47:00

Alex K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Dates BC


Hi!

I have the same problem in one of my projects. I used 2 fields for it. One
is standart DateField and another is BooleanField. If the second is True I
suppose the date is BC. This aprouch is very simply and work with all
Django supported databases.

On Tue, Jan 18, 2011 at 3:52 AM, Christophe Pettus <x...@thebuild.com> wrote:

>
> On Jan 17, 2011, at 2:00 PM, Ben Dembroski wrote:
> > I'm a relative newbie to both Python and Django, and in the middle of
> > my first Django project. My client is asking me to store and process
> > dates -- including dates BC.
>
> Unless you have a strong need to do date arithmetic on the dates, or you
> can use a different database (like PostgreSQL) that has more robust date
> support, it might be easier to represent the dates as stylized strings, or
> as integers on a uniform calendar like the proleptic Julian calendar,
> instead of using the built-in date type.
>
> --
> -- Christophe Pettus
> x...@thebuild.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>


--
Alex Kamedov
skype: kamedov www: kamedov.ru

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 21st of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support