Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

Print:
PDF:

Feature

Easy Dating

Creating a simple calendar widget

Issue: 5.5 (July/August 2007)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 19,057
Starting Page Number: 30
RBD Number: 5510
Resource File(s):

Download Icon 5510.zip Updated: Monday, July 16, 2007 at 12:20 PM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

Dates seem like such simple things to us humans, but they are surprisingly complex, especially when you look at the various ways dates are implemented internationally. For instance, in the U.S., we generally write the date as "MM/DD/YY" while in Europe the day is listed first ("DD/MM/YY"). Unfortunately, if all you are given are these numbers, it's utterly impossible to know which date "3/4/2007" means. Is it the fourth day of March or the third day of April? Unless you know the intention of whoever created the date string, it's impossible to know.

A mistake many REALbasic users make -- even experienced ones -- is assuming that REALbasic's parseDate function can solve the above problem. It cannot. That would be a guessDate function, which REALbasic does not have.

The purpose of parseDate is not to decipher the date format but to convert a date string into a date object. ParseDate expects the date string to be in the format set in the operating system. If it's not, the string cannot be converted to a date reliably.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com