<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Getting Started</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>Recent changes to Getting Started</description><atom:link href="https://sourceforge.net/p/i18nlib/wiki/Getting%20Started/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 17 Nov 2014 20:07:46 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/i18nlib/wiki/Getting%20Started/feed" rel="self" type="application/rss+xml"/><item><title>Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -1,15 +1,31 @@
 # Getting Started #

-This getting started guide is a brief introduction to iLib. 
+This getting started guide is a brief introduction to iLib.
+
+## Getting iLib ##
+
+You can get iLib in one of three ways:
+
+1. Download the already-assembled code from the [Files](https://sourceforge.net/projects/i18nlib/files/latest-builds) link in the tabs above, unzip or untar, et voila
+1. Download the source code from the [Code](https://sourceforge.net/p/i18nlib/code/trunk) link. The trunk always has the latest, and features are done in the separate branches.
+1. Use npm to get the latest build: "npm install ilib"

 ## Including iLib ##

-Let's say that you are creating a web application. To include iLib, you would take the file iliball-compiled.js from the iLib distribution and copy it to your web server where it is accessible to your pages.
+Let's say that you are creating a web application. To include iLib, you would take the file ilib-full-compiled.js from the iLib distribution and copy it to your web server where it is accessible to your pages.

 Then, you simply include it inside the head tag like any other Javascript file:

 ~~~~~
-&amp;lt;script type="text/javascript" src="iliball-compiled.js"&amp;gt;&amp;lt;/script&amp;gt; 
+&amp;lt;script type="text/javascript" src="ilib-full-compiled.js"&amp;gt;&amp;lt;/script&amp;gt; 
+~~~~~
+
+Now any iLib class is available to use.
+
+Now let's say you are creating a nodejs application. We assume that you have already installed the iLib npm package. At the beginning of your program, all you need to do is:
+
+~~~~~
+var ilib = require("ilib").ilib;
 ~~~~~

 Now any iLib class is available to use.
@@ -44,7 +60,7 @@
 Formatting a date is simply a matter of creating a date formatter instance and a date instance, and then formatting that date with the formatter. Those familiar with ICU or the Java libraries will be familiar with this pattern.

 ~~~~~
-var date = new ilib.Date.GregDate({
+var date = ilib.Date.newInstance({
     year: 2012,
     month: 5,
     day: 18
@@ -71,7 +87,7 @@
 var tzServer = new ilib.timeZone();

 // date we are interested in
-var date = new ilib.Date.GregDate({
+var date = ilib.Date.newInstance({
     year: 2012,
     month: 6,
     day: 1
@@ -85,4 +101,4 @@

 ## More Reading ##

-The above is just a flavour of what you can get from iLib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/iLib1.0JSTutorial.pdf) that goes into detail about all the things iLib can do. You can also browse [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
+The above is just a flavour of what you can get from iLib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/iLib1.0JSTutorial.pdf) that goes into detail about all the things iLib can do and a number of tutorial pages listed on the home page of this wiki. You can also browse [the latest API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Mon, 17 Nov 2014 20:07:46 -0000</pubDate><guid>https://sourceforge.neteb5dfe4170055cbeb00a932666a1d92e49d54b30</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v9
+++ v10
@@ -85,4 +85,4 @@
 
 ## More Reading ##
 
-The above is just a flavour of what you can get from iLib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/ILIb1.0JSTutorial.pdf) that goes into detail about all the things iLib can do. You can also browse [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
+The above is just a flavour of what you can get from iLib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/iLib1.0JSTutorial.pdf) that goes into detail about all the things iLib can do. You can also browse [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Thu, 21 Jun 2012 21:57:30 -0000</pubDate><guid>https://sourceforge.netcec618d3b1be6c38dc0ff78be55608c390aa12c5</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v8
+++ v9
@@ -1,10 +1,10 @@
 # Getting Started #
 
-This getting started guide is a brief introduction to ILib. 
+This getting started guide is a brief introduction to iLib. 
 
-## Including ILib ##
+## Including iLib ##
 
-Let's say that you are creating a web application. To include ILib, you would take the file iliball-compiled.js from the ILib distribution and copy it to your web server where it is accessible to your pages.
+Let's say that you are creating a web application. To include iLib, you would take the file iliball-compiled.js from the iLib distribution and copy it to your web server where it is accessible to your pages.
 
 Then, you simply include it inside the head tag like any other Javascript file:
 
@@ -12,11 +12,11 @@
 &lt;script type="text/javascript" src="iliball-compiled.js"&gt;&lt;/script&gt; 
 ~~~~~
 
-Now any ILib class is available to use.
+Now any iLib class is available to use.
 
-## ILib Classes ##
+## iLib Classes ##
 
-In ILib currently, there are three general types of classes:
+In iLib currently, there are three general types of classes:
 
 1. Object modelers which also parse things. These model a specific type of data and the constructor usually parses a string and interprets it in some way.
 1. Formatters. These take model instances and format them back into strings in a locale-sensitive manner.
@@ -54,7 +54,7 @@
 // output is "The date is Fri 5/18/2012"
 ~~~~~
 
-Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, only one argument was passed to the _ilib.DateFmt_ constructor to tell it to format dates only, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) for more details on the parameters to the constructor of the _ilib.DateFmt_ class.
+Et voila, you have a formatted date. The strength of iLib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, only one argument was passed to the _ilib.DateFmt_ constructor to tell it to format dates only, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) for more details on the parameters to the constructor of the _ilib.DateFmt_ class.
 
 ## An Info Object ##
 
@@ -85,4 +85,4 @@
 
 ## More Reading ##
 
-The above is just a flavour of what you can get from ILib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/ILIb1.0JSTutorial.pdf) that goes into detail about all the things ILib can do. You can also browse [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
+The above is just a flavour of what you can get from iLib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/ILIb1.0JSTutorial.pdf) that goes into detail about all the things iLib can do. You can also browse [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Thu, 21 Jun 2012 20:41:59 -0000</pubDate><guid>https://sourceforge.net7104d29037054b37de94a39f9ee7a56e3c1e9eb0</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v7
+++ v8
@@ -85,4 +85,4 @@
 
 ## More Reading ##
 
-The above is just a flavour of what you can get from ILib. There is also a more complete [tutorial](ILib 1.0 Tutorial) that goes into detail about all the things ILib can do. You can also browse [the API reference documentation](refdocs) when you are ready to start coding.
+The above is just a flavour of what you can get from ILib. There is also a more complete [tutorial](http://docs.jedlsoft.com/ilib/ILIb1.0JSTutorial.pdf) that goes into detail about all the things ILib can do. You can also browse [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) when you are ready to start coding.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Mon, 04 Jun 2012 09:04:06 -0000</pubDate><guid>https://sourceforge.net18fdf97458a8c664d2a1ad8111b571a26868edd3</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v6
+++ v7
@@ -54,7 +54,7 @@
 // output is "The date is Fri 5/18/2012"
 ~~~~~
 
-Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, only one argument was passed to the _ilib.DateFmt_ constructor to tell it to format dates only, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](refdocs) for more details on the parameters to the constructor of the _ilib.DateFmt_ class.
+Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, only one argument was passed to the _ilib.DateFmt_ constructor to tell it to format dates only, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](http://docs.jedlsoft.com/ilib/jsdoc/) for more details on the parameters to the constructor of the _ilib.DateFmt_ class.
 
 ## An Info Object ##
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Mon, 04 Jun 2012 09:01:33 -0000</pubDate><guid>https://sourceforge.net5f9559a47e629c0da00162cd032efd6f03274bd8</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v5
+++ v6
@@ -54,7 +54,7 @@
 // output is "The date is Fri 5/18/2012"
 ~~~~~
 
-Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, no arguments were passed to the _ilib.DateFmt_ constructor, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](refdocs) for more details on the parameters for the _ilib.DateFmt_ class.
+Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, only one argument was passed to the _ilib.DateFmt_ constructor to tell it to format dates only, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](refdocs) for more details on the parameters to the constructor of the _ilib.DateFmt_ class.
 
 ## An Info Object ##
 
@@ -77,7 +77,8 @@
     day: 1
 });
 
-var userOffset = tzUser.getOffset(date);
+// need the date because the offset changes due to daylight savings time
+var userOffset = tzUser.getOffset(date); 
 var serverOffset = tzServer.getOffset(date);
 var differenceInHours = (userOffset.h + userOffset.m/60) - (serverOffset.h + serverOffset.m/60);
 ~~~~~
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Sat, 26 May 2012 10:28:27 -0000</pubDate><guid>https://sourceforge.net4d4eb52ac79701121cb74351f008477a81f04044</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v4
+++ v5
@@ -33,7 +33,8 @@
     locale: 'de-DE'
 });
 
-console.log("The number with English conventions is " + num.valueOf());
+console.log("The number is " + num.valueOf());
+// output is "The number is 54321.05"
 ~~~~~
 
 The _valueOf()_ method gives you the value of the number instance as an actual Javascript number.
@@ -48,8 +49,9 @@
     month: 5,
     day: 18
 });
-var formatter = new ilib.DateFmt(); // no params means "default" locale and format
+var formatter = new ilib.DateFmt({type: date});
 console.log("The date is " + formatter.format(date));
+// output is "The date is Fri 5/18/2012"
 ~~~~~
 
 Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, no arguments were passed to the _ilib.DateFmt_ constructor, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](refdocs) for more details on the parameters for the _ilib.DateFmt_ class.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Sat, 26 May 2012 10:24:43 -0000</pubDate><guid>https://sourceforge.netaaaaba7644d19e708e9d7ec4dcff5e0cb9dd8260</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v3
+++ v4
@@ -75,7 +75,9 @@
     day: 1
 });
 
-var difference = tzUser.getOffset(date) - tzServer.getOffset(date);
+var userOffset = tzUser.getOffset(date);
+var serverOffset = tzServer.getOffset(date);
+var differenceInHours = (userOffset.h + userOffset.m/60) - (serverOffset.h + serverOffset.m/60);
 ~~~~~
 
 ## More Reading ##
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Sat, 26 May 2012 10:17:25 -0000</pubDate><guid>https://sourceforge.neta9039f11e8535c995a07e78b2effa7902c7bd8cc</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v2 
+++ v3 
@@ -54,17 +54,21 @@
 
 Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, no arguments were passed to the _ilib.DateFmt_ constructor, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](refdocs) for more details on the parameters for the _ilib.DateFmt_ class.
 
-## Info Object ##
-
+## An Info Object ##
+
 Let's say you want to get some information about a time zone. Specifically, you would like to know how many hours different a user's time zone is from the server's time zone so that your code can give them info appropriate to the time in their time zone.
 
 First, you would create a time zone instance with the id of the user's time zone, and another instance with the id of the server's time zone. Then, for a particular time and date, you find out what the offset is to UTC for each time zone, then subtract.
 
 ~~~~~
 var tzUser = new ilib.TimeZone({
     id: 'Europe/Berlin'
 });
+
+// default to the current time zone
 var tzServer = new ilib.timeZone();
+
+// date we are interested in
 var date = new ilib.Date.GregDate({
     year: 2012,
     month: 6,
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Sat, 19 May 2012 09:37:18 -0000</pubDate><guid>https://sourceforge.net6cf842ce7174b4f4d49994b5ad034c83f7d64250</guid></item><item><title>WikiPage Getting Started modified by Edwin H</title><link>https://sourceforge.net/p/i18nlib/wiki/Getting%2520Started/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -1,35 +1,79 @@
 # Getting Started #
 
-This getting started guide is a brief introduction to ILib. There is also a more complete [tutorial](ILib 1.0 Tutorial) that goes into more detail about all the things ILib can do. You can also browse [the API reference documentation](refdocs) when you are ready to start coding.
-
+This getting started guide is a brief introduction to ILib. 
+
 ## Including ILib ##
 
 Let's say that you are creating a web application. To include ILib, you would take the file iliball-compiled.js from the ILib distribution and copy it to your web server where it is accessible to your pages.
 
 Then, you simply include it inside the head tag like any other Javascript file:
 
 ~~~~~
 &lt;script type="text/javascript" src="iliball-compiled.js"&gt;&lt;/script&gt; 
 ~~~~~
 
 Now any ILib class is available to use.
 
-## Formatting a Date ##
+## ILib Classes ##
+
+In ILib currently, there are three general types of classes:
+
+1. Object modelers which also parse things. These model a specific type of data and the constructor usually parses a string and interprets it in some way.
+1. Formatters. These take model instances and format them back into strings in a locale-sensitive manner.
+1. Info objects. These are object wrappers around basic info that the object models and formatters use.
+
+This guide will briefly go through one example of each type.
+
+## An Object Model ##
+
+The _ilib.Number_ class represents a number. It can parse numbers written as strings in many different locales.
+
+~~~~~
+var num = new ilib.Number("54.321,05", {
+    locale: 'de-DE'
+});
+
+console.log("The number with English conventions is " + num.valueOf());
+~~~~~
+
+The _valueOf()_ method gives you the value of the number instance as an actual Javascript number.
+
+## A Formatter ##
 
 Formatting a date is simply a matter of creating a date formatter instance and a date instance, and then formatting that date with the formatter. Those familiar with ICU or the Java libraries will be familiar with this pattern.
 
 ~~~~~
 var date = new ilib.Date.GregDate({
     year: 2012,
     month: 5,
     day: 18
 });
 var formatter = new ilib.DateFmt(); // no params means "default" locale and format
 console.log("The date is " + formatter.format(date));
 ~~~~~
 
 Et voila, you have a formatted date. The strength of ILib is that the formatter classes are very configurable. The format is controlled via options to the _ilib.DateFmt()_ constructor. In the example above, no arguments were passed to the _ilib.DateFmt_ constructor, so it will use the current locale and default format and length of format for that locale. See [the API reference documentation](refdocs) for more details on the parameters for the _ilib.DateFmt_ class.
 
-## Getting Info about a Time Zone ##
-
-ILib does all sorts of things, including retrieving info about time zones.
+## Info Object ##
+
+Let's say you want to get some information about a time zone. Specifically, you would like to know how many hours different a user's time zone is from the server's time zone so that your code can give them info appropriate to the time in their time zone.
+
+First, you would create a time zone instance with the id of the user's time zone, and another instance with the id of the server's time zone. Then, for a particular time and date, you find out what the offset is to UTC for each time zone, then subtract.
+
+~~~~~
+var tzUser = new ilib.TimeZone({
+    id: 'Europe/Berlin'
+});
+var tzServer = new ilib.timeZone();
+var date = new ilib.Date.GregDate({
+    year: 2012,
+    month: 6,
+    day: 1
+});
+
+var difference = tzUser.getOffset(date) - tzServer.getOffset(date);
+~~~~~
+
+## More Reading ##
+
+The above is just a flavour of what you can get from ILib. There is also a more complete [tutorial](ILib 1.0 Tutorial) that goes into detail about all the things ILib can do. You can also browse [the API reference documentation](refdocs) when you are ready to start coding.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Edwin H</dc:creator><pubDate>Sat, 19 May 2012 09:19:39 -0000</pubDate><guid>https://sourceforge.net0a4315902556c9a2382a5ebec80e72aef1e7916c</guid></item></channel></rss>