Forum OpenACS Development: Response to Date formats in OpenACS

Posted by carl garland on

Since everyone is in the stage of porting I think that it would be preemptive to determine a generic procedure for displaying date/times now so everyone could use *that* procedure while they are porting instead of going back and replacing.

This could currently be just wrapped into PrettyDate now but I think it is very nice to allow the user to personalize the system and not force a format on them. What I envision for now would be something like

proc Display_Date { datetime {timezone 0} {format ""} {
    return [AnsiPrettyDate datetime]

But down the line we can rework it to add in the other features. Of course we could always just use AnsiPrettyDate and override it down the line but the proc name would be deceptive especially to people used to the other version. I would suggest to always retrieve the datetime in INTEGER form for easier manipulation and storing the timezone as offset but those introduce probs of their own. I will work up a more detailed discussion doc and post but since people are callling some sort of proc I think this would make things smoother when prob is attacked. Best Regards, Carl