/* * Nameday ver 2.0.1 2003-11-02 * Copyright (c) 2002-2003 by Michal Nazarewicz (mina86@tlen.pl) * * This script is free software; It is ditributed under terms of * GNU Lesser General Public License. Copy of the license can be found * at www.gnu.org/licenses/licenses.html#LGPL * * Visit www.projektcode.prv.pl for more.. */ // // Tuday's date :) // var nameday_date = new Date(), nameday_day = nameday_date.getDate(), nameday_month = nameday_date.getMonth()+1; // // Object representing names // function NamedayNames(names) { if (names instanceof Array) { this.names = names; } else { this.names = names.split('|'); } } NamedayNames.prototype = { join: function(sep, last_sep, limit) { // Init args switch (arguments.length) { case 0: sep = null; case 1: last_sep = null; case 2: limit = null; case 3: break; default: return false; } // Get names var names = this.getNames(limit); // Join if (sep==null) { sep = ', '; } if (last_sep==null) { return names.join(sep); } else { var str = ''; for (var i = 0; i1) { return false; } // All requested if (arguments.length==0 || limit==null || limit<1 || limit>=this.names.length) { return this.names; // Limit requested } else { var arr = new Array(limit); for (var i = 0; i","
",", "," i ");