SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Summary

A simple module for converting dates from Gregorian to Discordian.

Overview

This is a very simple module which allows for conversion from normal dates (via 'time.time', 'time.localtime', etc.) to Discordian dates (a silly made-up dating system that divides a year into five seasons of 73 days each). The module can either be used as a standalone command line application (which prints the current date in Discordian form) or as a extension module.

Getting the software

The current version of discord is 1.0.

The latest version of the software is available in a tarball here: "http://www.alcyone.com/pyos/discord/discord-latest.tar.gz", http://www.alcyone.com/pyos/discord/discord-latest.tar.gz.

The official URL for this Web site is "http://www.alcyone.com/pyos/discord/", http://www.alcyone.com/pyos/discord/.

Requirements

This module requires Python 2.0 or greater.

License

This code is released under the "GPL", http://www.gnu.org/copyleft/gpl.html.

Usage

The program can be run from the command line with simply::

./discord.py

which will print the current date. When used as a module, the 'discord.discord' function takes a 9-tuple of data representing the time (as returned by 'time.localtime', etc.) and returns a 5-tuple representing the Discordian date (the date only). The five elements of the returned tuple are:

**year** -- The current Discordian year.

**season** -- The Discordian season, indexing from 0.

**day** -- The day of the current season, indexing from 1.

**weekday** -- The current Discordian weekday, indexing from 0.

**tibs** -- A Boolean flag indicating whether or not today is Tib's Day (corresponding to Leap Day in the Gregorian calendar).

The 'discord.string' function takes one of these 5-tuples and returns it as a string representation.

Release history

  • 1.0; 2003 Mar 18. Initial release.

Author

This module was written by "Erik Max Francis", http://www.alcyone.com/max/. If you use this software, have suggestions for future releases, or bug reports, "I'd love to hear about it", mailto:pyos@alcyone.com.

Version

Version 1.0 $Date: 2003/03/18 $ $Author: max $


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.