Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 16 in printed book and digital formats -- plus a one-year subscription (beginning with 17.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 5.5

FEATURE

Easy Dating

Creating a simple calendar widget

Issue: 5.5 (July/August 2007)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 26,174
Starting Page Number: 30
Article Number: 5510
Resource File(s):

Download Icon 5510.zip Updated: 2007-07-16 12:19:57

Related Link(s): 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.