Project II: A More Powerful Date Script

Although the simple date script above illustrated how simple it is to use a function that is built into a JavaScript object, this "fancy" script illustrates a more programmatic approach to generate a date on the fly: The approach outlined below can easily be customized so that you can generate a date that is laid out exactly the way you want.

Because this approach is flexible, it involves more code, which gives us an opportunity to examine some new features. The primary focus will be the three data types: numbers, strings, and arrays.

New Features

// (Comment)

Code tends to make sense to those who write it, while they're writing it. To others, or even to the person who wrote it a few months later, it starts ...

Get Essential ASP for Web Professionals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.