Re-arranged countries. Documentation and clean up. PEP 9.46

svn: r11947
This commit is contained in:
Rob G. Healey 2009-02-10 07:19:56 +00:00
parent a356c5aa7c
commit f8875759ab
2 changed files with 291 additions and 249 deletions

View File

@ -1,5 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<calendar>
<country name="United States">
<date name="New Year's Day" value="*/1/1" type="national" />
<date name="New Year's Eve" value="*/12/31" type="national" />
<date name="Independence Day" value="*/7/4" type="national" />
<date name="Veterans Day" value="*/11/11" type="national" />
<date name="Christmas" value="*/12/25" type="national" />
<date name="Labor Day" value="1999/9/6" type="national" />
<date name="Labor Day" value="2000/9/4" type="national" />
<date name="Labor Day" value="2001/9/3" type="national" />
<date name="Labor Day" value="2002/9/2" type="national" />
<date name="Labor Day" value="2003/9/1" type="national" />
<date name="Labor Day" value="2004/9/6" type="national" />
<date name="Labor Day" value="2005/9/5" type="national" />
<date name="Labor Day" value="2006/9/4" type="national" />
<date name="Labor Day" value="2007/9/3" type="national" />
<date name="Labor Day" value="2008/9/1" type="national" />
<date name="Labor Day" value="2009/9/1" type="national" />
<date name="Labor Day" value="2010/9/6" type="national" />
<date name="Labor Day" value="2011/9/5" type="national" />
<date name="Labor Day" value="2012/9/3" type="national" />
<date name="Labor Day" value="2013/9/2" type="national" />
<date name="Labor Day" value="2014/9/1" type="national" />
<date name="Labor Day" value="2015/9/7" type="national" />
<date name="Labor Day" value="2016/9/5" type="national" />
<date name="Labor Day" value="2017/9/4" type="national" />
<date name="Labor Day" value="2018/9/3" type="national" />
<date name="Labor Day" value="2019/9/2" type="national" />
<date name="Thanksgiving" value="*/4/thu/nov" type="national" />
<date name="Inauguration Day" value="1997/1/20" type="national" />
<date name="Inauguration Day" value="2001/1/20" type="national" />
<date name="Inauguration Day" value="2005/1/20" type="national" />
<date name="Inauguration Day" value="2009/1/20" type="national" />
<date name="Inauguration Day" value="2013/1/20" type="national" />
<date name="Inauguration Day" value="2017/1/20" type="national" />
<date name="Groundhog Day" value="*/2/2" type="secular" />
<date name="Lincoln's Birthday" value="*/2/12" type="secular" />
<date name="Valentine's Day" value="*/2/14" type="secular" />
<date name="Presidents' Day" value="*/3/mon/feb" type="secular" />
<date name="Washington's Birthday" value="*/2/22" type="secular" />
<date name="St. Patrick's Day" value="*/3/17" type="secular" />
<date name="April Fool's Day" value="*/4/1" type="secular" />
<date name="Earth Day" value="*/4/22" type="secular" />
<date name="Assistants' Day" value="*/-1/sat/apr" offset="-3" type="secular" />
<date name="Arbor Day" value="*/-1/fri/apr" type="secular" />
<date name="Mothers' Day" value="*/2/sun/may" type="secular" />
<date name="Fathers' Day" value="*/3/sun/jun" type="secular" />
<date name="Parents' Day" value="*/4/sun/jul" type="secular" />
<date name="Grandparents' Day" value="*/1/mon/sep" offset="6" type="secular" />
<date name="Columbus Day" value="*/2/mon/oct" type="secular" />
<date name="United Nations Day" value="*/10/24" type="secular" />
<date name="Halloween" value="*/10/31" type="secular" />
<date name="ML Kings's Birthday" value="*/3/mon/jan" type="secular" />
<date name="Armed Forces Day" value="*/3/sat/may" type="secular" />
<date name="Memorial Day" value="*/-1/mon/may" type="secular" />
<date name="Flag Day" value="*/6/14" type="secular" />
<date name="Election Day" value="*/11/2" offset="tue" type="secular" />
<date name="Daylight Saving begins" value="1999/4/4" type="informational" />
<date name="Daylight Saving begins" value="2000/4/2" type="informational" />
<date name="Daylight Saving begins" value="2001/4/1" type="informational" />
<date name="Daylight Saving begins" value="2002/4/7" type="informational" />
<date name="Daylight Saving begins" value="2003/4/6" type="informational" />
<date name="Daylight Saving begins" value="2004/4/4" type="informational" />
<date name="Daylight Saving begins" value="2005/4/3" type="informational" />
<date name="Daylight Saving begins" value="2006/4/2" type="informational" />
<date name="Daylight Saving begins" value="2007/3/11" type="informational" />
<date name="Daylight Saving begins" value="2008/3/9" type="informational" />
<date name="Daylight Saving begins" value="2009/3/8" type="informational" />
<date name="Daylight Saving begins" value="2010/3/14" type="informational" />
<date name="Daylight Saving begins" value="2011/3/13" type="informational" />
<date name="Daylight Saving begins" value="2012/3/11" type="informational" />
<date name="Daylight Saving begins" value="2013/3/10" type="informational" />
<date name="Daylight Saving begins" value="2014/3/9" type="informational" />
<date name="Daylight Saving begins" value="2015/3/8" type="informational" />
<date name="Daylight Saving begins" value="2016/3/13" type="informational" />
<date name="Daylight Saving begins" value="2017/3/12" type="informational" />
<date name="Daylight Saving begins" value="2018/3/11" type="informational" />
<date name="Daylight Saving begins" value="2019/3/10" type="informational" />
<date name="Income Taxes due" value="1999/4/15" type="national" />
<date name="Income Taxes due" value="2000/4/17" type="national" />
<date name="Income Taxes due" value="2001/4/16" type="national" />
<date name="Income Taxes due" value="2002/4/15" type="national" />
<date name="Income Taxes due" value="2003/4/15" type="national" />
<date name="Income Taxes due" value="2004/4/15" type="national" />
<date name="Income Taxes due" value="2005/4/15" type="national" />
<date name="Income Taxes due" value="2006/4/17" type="national" />
<date name="Income Taxes due" value="2007/4/16" type="national" />
<date name="Income Taxes due" value="2008/4/15" type="national" />
<date name="Income Taxes due" value="2009/4/15" type="national" />
<date name="Income Taxes due" value="2010/4/15" type="national" />
<date name="Income Taxes due" value="2011/4/15" type="national" />
<date name="Income Taxes due" value="2012/4/16" type="national" />
<date name="Income Taxes due" value="2013/4/15" type="national" />
<date name="Income Taxes due" value="2014/4/15" type="national" />
<date name="Income Taxes due" value="2015/4/15" type="national" />
<date name="Income Taxes due" value="2016/4/15" type="national" />
<date name="Income Taxes due" value="2017/4/17" type="national" />
<date name="Income Taxes due" value="2018/4/16" type="national" />
<date name="Income Taxes due" value="2019/4/15" type="national" />
<date name="Daylight Saving ends" value="1999/10/31" type="informational" />
<date name="Daylight Saving ends" value="2000/10/29" type="informational" />
<date name="Daylight Saving ends" value="2001/10/28" type="informational" />
<date name="Daylight Saving ends" value="2002/10/27" type="informational" />
<date name="Daylight Saving ends" value="2003/10/26" type="informational" />
<date name="Daylight Saving ends" value="2004/10/31" type="informational" />
<date name="Daylight Saving ends" value="2005/10/30" type="informational" />
<date name="Daylight Saving ends" value="2006/10/29" type="informational" />
<date name="Daylight Saving ends" value="2007/11/4" type="informational" />
<date name="Daylight Saving ends" value="2008/11/2" type="informational" />
<date name="Daylight Saving ends" value="2009/11/1" type="informational" />
<date name="Daylight Saving ends" value="2010/11/7" type="informational" />
<date name="Daylight Saving ends" value="2011/11/6" type="informational" />
<date name="Daylight Saving ends" value="2012/11/4" type="informational" />
<date name="Daylight Saving ends" value="2013/11/3" type="informational" />
<date name="Daylight Saving ends" value="2014/11/2" type="informational" />
<date name="Daylight Saving ends" value="2015/11/1" type="informational" />
<date name="Daylight Saving ends" value="2016/11/6" type="informational" />
<date name="Daylight Saving ends" value="2017/11/5" type="informational" />
<date name="Daylight Saving ends" value="2018/11/4" type="informational" />
<date name="Daylight Saving ends" value="2019/11/3" type="informational" />
<date name="Easter" value="1999/4/4" type="religious" />
<date name="Easter" value="2000/4/25" type="religious" />
<date name="Easter" value="2001/4/15" type="religious" />
<date name="Easter" value="2002/3/31" type="religious" />
<date name="Easter" value="2003/4/20" type="religious" />
<date name="Easter" value="2004/4/11" type="religious" />
<date name="Easter" value="2005/3/27" type="religious" />
<date name="Easter" value="2006/4/16" type="religious" />
<date name="Easter" value="2007/4/8" type="religious" />
<date name="Easter" value="2008/3/23" type="religious" />
<date name="Easter" value="2009/4/12" type="religious" />
<date name="Easter" value="2010/4/4" type="religious" />
<date name="Easter" value="2011/4/24" type="religious" />
<date name="Easter" value="2012/4/8" type="religious" />
<date name="Easter" value="2013/3/31" type="religious" />
<date name="Easter" value="2014/4/20" type="religious" />
<date name="Easter" value="2015/4/5" type="religious" />
<date name="Easter" value="2016/3/27" type="religious" />
<date name="Easter" value="2017/4/16" type="religious" />
<date name="Easter" value="2018/4/1" type="religious" />
<date name="Easter" value="2019/4/21" type="religious" />
<date name="Ash Wednesday" value="1999/2/17" type="religious" />
<date name="Ash Wednesday" value="1999/2/17" type="religious" />
<date name="Ash Wednesday" value="2000/3/8" type="religious" />
<date name="Ash Wednesday" value="2001/2/28" type="religious" />
<date name="Ash Wednesday" value="2002/2/13" type="religious" />
<date name="Ash Wednesday" value="2003/3/5" type="religious" />
<date name="Ash Wednesday" value="2004/2/25" type="religious" />
<date name="Ash Wednesday" value="2005/2/9" type="religious" />
<date name="Ash Wednesday" value="2006/3/1" type="religious" />
<date name="Ash Wednesday" value="2007/2/21" type="religious" />
<date name="Ash Wednesday" value="2008/2/6" type="religious" />
<date name="Ash Wednesday" value="2009/2/25" type="religious" />
<date name="Ash Wednesday" value="2010/2/17" type="religious" />
<date name="Ash Wednesday" value="2011/3/9" type="religious" />
<date name="Ash Wednesday" value="2012/2/22" type="religious" />
<date name="Ash Wednesday" value="2013/2/13" type="religious" />
<date name="Ash Wednesday" value="2014/3/5" type="religious" />
<date name="Ash Wednesday" value="2015/2/18" type="religious" />
<date name="Ash Wednesday" value="2016/2/10" type="religious" />
<date name="Ash Wednesday" value="2017/3/1" type="religious" />
<date name="Ash Wednesday" value="2018/2/14" type="religious" />
<date name="Ash Wednesday" value="2019/3/6" type="religious" />
<date name="Passover" value="2005/4/24" type="religious" />
<date name="Passover" value="2006/4/13" type="religious" />
<date name="Passover" value="2007/4/03" type="religious" />
<date name="Passover" value="2008/4/20" type="religious" />
<date name="Passover" value="2009/4/09" type="religious" />
<date name="Passover" value="2010/3/30" type="religious" />
<date name="Passover" value="2011/4/19" type="religious" />
<date name="Yom Kippur" value="2005/10/13" type="religious" />
<date name="Yom Kippur" value="2006/10/02" type="religious" />
<date name="Yom Kippur" value="2007/9/27" type="religious" />
<date name="Yom Kippur" value="2008/10/09" type="religious" />
<date name="Yom Kippur" value="2009/09/28" type="religious" />
<date name="Yom Kippur" value="2010/09/18" type="religious" />
<date name="Hanukkah begins" value="2004/12/07" type="religious" />
<date name="Hanukkah begins" value="2005/12/25" type="religious" />
<date name="Hanukkah begins" value="2006/12/15" type="religious" />
<date name="Hanukkah begins" value="2007/12/04" type="religious" />
<date name="Hanukkah begins" value="2008/12/21" type="religious" />
<date name="Hanukkah begins" value="2009/12/11" type="religious" />
<date name="Hanukkah begins" value="2010/12/01" type="religious" />
<date name="Ramadan begins" value="2006/09/24" type="religious" />
<date name="Ramadan begins" value="2007/09/13" type="religious" />
<date name="Ramadan begins" value="2008/09/2" type="religious" />
<date name="Ramadan begins" value="2009/08/22" type="religious" />
<date name="Kwanzaa begins" value="*/12/26" type="religious" />
<date name="Cinco de Mayo" value="*/5/5" type="secular" />
</country>
<country name="Canada">
<date name="New Year's Day" value="*/1/1" type="national" />
<date name="Groundhog Day" value="*/2/2" type="secular" />
@ -376,193 +565,4 @@
<date name="Juldagen" value="*/12/25" type="national" />
<date name="Annandag Jul" value="*/12/26" type="national" />
</country>
<country name="United States">
<date name="New Year's Day" value="*/1/1" type="national" />
<date name="New Year's Eve" value="*/12/31" type="national" />
<date name="Independence Day" value="*/7/4" type="national" />
<date name="Veterans Day" value="*/11/11" type="national" />
<date name="Christmas" value="*/12/25" type="national" />
<date name="Labor Day" value="1999/9/6" type="national" />
<date name="Labor Day" value="2000/9/4" type="national" />
<date name="Labor Day" value="2001/9/3" type="national" />
<date name="Labor Day" value="2002/9/2" type="national" />
<date name="Labor Day" value="2003/9/1" type="national" />
<date name="Labor Day" value="2004/9/6" type="national" />
<date name="Labor Day" value="2005/9/5" type="national" />
<date name="Labor Day" value="2006/9/4" type="national" />
<date name="Labor Day" value="2007/9/3" type="national" />
<date name="Labor Day" value="2008/9/1" type="national" />
<date name="Labor Day" value="2009/9/1" type="national" />
<date name="Labor Day" value="2010/9/6" type="national" />
<date name="Labor Day" value="2011/9/5" type="national" />
<date name="Labor Day" value="2012/9/3" type="national" />
<date name="Labor Day" value="2013/9/2" type="national" />
<date name="Labor Day" value="2014/9/1" type="national" />
<date name="Labor Day" value="2015/9/7" type="national" />
<date name="Labor Day" value="2016/9/5" type="national" />
<date name="Labor Day" value="2017/9/4" type="national" />
<date name="Labor Day" value="2018/9/3" type="national" />
<date name="Labor Day" value="2019/9/2" type="national" />
<date name="Thanksgiving" value="*/4/thu/nov" type="national" />
<date name="Inauguration Day" value="1997/1/20" type="national" />
<date name="Inauguration Day" value="2001/1/20" type="national" />
<date name="Inauguration Day" value="2005/1/20" type="national" />
<date name="Inauguration Day" value="2009/1/20" type="national" />
<date name="Inauguration Day" value="2013/1/20" type="national" />
<date name="Inauguration Day" value="2017/1/20" type="national" />
<date name="Groundhog Day" value="*/2/2" type="secular" />
<date name="Lincoln's Birthday" value="*/2/12" type="secular" />
<date name="Valentine's Day" value="*/2/14" type="secular" />
<date name="Presidents' Day" value="*/3/mon/feb" type="secular" />
<date name="Washington's Birthday" value="*/2/22" type="secular" />
<date name="St. Patrick's Day" value="*/3/17" type="secular" />
<date name="April Fool's Day" value="*/4/1" type="secular" />
<date name="Earth Day" value="*/4/22" type="secular" />
<date name="Assistants' Day" value="*/-1/sat/apr" offset="-3" type="secular" />
<date name="Arbor Day" value="*/-1/fri/apr" type="secular" />
<date name="Mothers' Day" value="*/2/sun/may" type="secular" />
<date name="Fathers' Day" value="*/3/sun/jun" type="secular" />
<date name="Parents' Day" value="*/4/sun/jul" type="secular" />
<date name="Grandparents' Day" value="*/1/mon/sep" offset="6" type="secular" />
<date name="Columbus Day" value="*/2/mon/oct" type="secular" />
<date name="United Nations Day" value="*/10/24" type="secular" />
<date name="Halloween" value="*/10/31" type="secular" />
<date name="ML Kings's Birthday" value="*/3/mon/jan" type="secular" />
<date name="Armed Forces Day" value="*/3/sat/may" type="secular" />
<date name="Memorial Day" value="*/-1/mon/may" type="secular" />
<date name="Flag Day" value="*/6/14" type="secular" />
<date name="Election Day" value="*/11/2" offset="tue" type="secular" />
<date name="Daylight Saving begins" value="1999/4/4" type="informational" />
<date name="Daylight Saving begins" value="2000/4/2" type="informational" />
<date name="Daylight Saving begins" value="2001/4/1" type="informational" />
<date name="Daylight Saving begins" value="2002/4/7" type="informational" />
<date name="Daylight Saving begins" value="2003/4/6" type="informational" />
<date name="Daylight Saving begins" value="2004/4/4" type="informational" />
<date name="Daylight Saving begins" value="2005/4/3" type="informational" />
<date name="Daylight Saving begins" value="2006/4/2" type="informational" />
<date name="Daylight Saving begins" value="2007/3/11" type="informational" />
<date name="Daylight Saving begins" value="2008/3/9" type="informational" />
<date name="Daylight Saving begins" value="2009/3/8" type="informational" />
<date name="Daylight Saving begins" value="2010/3/14" type="informational" />
<date name="Daylight Saving begins" value="2011/3/13" type="informational" />
<date name="Daylight Saving begins" value="2012/3/11" type="informational" />
<date name="Daylight Saving begins" value="2013/3/10" type="informational" />
<date name="Daylight Saving begins" value="2014/3/9" type="informational" />
<date name="Daylight Saving begins" value="2015/3/8" type="informational" />
<date name="Daylight Saving begins" value="2016/3/13" type="informational" />
<date name="Daylight Saving begins" value="2017/3/12" type="informational" />
<date name="Daylight Saving begins" value="2018/3/11" type="informational" />
<date name="Daylight Saving begins" value="2019/3/10" type="informational" />
<date name="Income Taxes due" value="1999/4/15" type="national" />
<date name="Income Taxes due" value="2000/4/17" type="national" />
<date name="Income Taxes due" value="2001/4/16" type="national" />
<date name="Income Taxes due" value="2002/4/15" type="national" />
<date name="Income Taxes due" value="2003/4/15" type="national" />
<date name="Income Taxes due" value="2004/4/15" type="national" />
<date name="Income Taxes due" value="2005/4/15" type="national" />
<date name="Income Taxes due" value="2006/4/17" type="national" />
<date name="Income Taxes due" value="2007/4/16" type="national" />
<date name="Income Taxes due" value="2008/4/15" type="national" />
<date name="Income Taxes due" value="2009/4/15" type="national" />
<date name="Income Taxes due" value="2010/4/15" type="national" />
<date name="Income Taxes due" value="2011/4/15" type="national" />
<date name="Income Taxes due" value="2012/4/16" type="national" />
<date name="Income Taxes due" value="2013/4/15" type="national" />
<date name="Income Taxes due" value="2014/4/15" type="national" />
<date name="Income Taxes due" value="2015/4/15" type="national" />
<date name="Income Taxes due" value="2016/4/15" type="national" />
<date name="Income Taxes due" value="2017/4/17" type="national" />
<date name="Income Taxes due" value="2018/4/16" type="national" />
<date name="Income Taxes due" value="2019/4/15" type="national" />
<date name="Daylight Saving ends" value="1999/10/31" type="informational" />
<date name="Daylight Saving ends" value="2000/10/29" type="informational" />
<date name="Daylight Saving ends" value="2001/10/28" type="informational" />
<date name="Daylight Saving ends" value="2002/10/27" type="informational" />
<date name="Daylight Saving ends" value="2003/10/26" type="informational" />
<date name="Daylight Saving ends" value="2004/10/31" type="informational" />
<date name="Daylight Saving ends" value="2005/10/30" type="informational" />
<date name="Daylight Saving ends" value="2006/10/29" type="informational" />
<date name="Daylight Saving ends" value="2007/11/4" type="informational" />
<date name="Daylight Saving ends" value="2008/11/2" type="informational" />
<date name="Daylight Saving ends" value="2009/11/1" type="informational" />
<date name="Daylight Saving ends" value="2010/11/7" type="informational" />
<date name="Daylight Saving ends" value="2011/11/6" type="informational" />
<date name="Daylight Saving ends" value="2012/11/4" type="informational" />
<date name="Daylight Saving ends" value="2013/11/3" type="informational" />
<date name="Daylight Saving ends" value="2014/11/2" type="informational" />
<date name="Daylight Saving ends" value="2015/11/1" type="informational" />
<date name="Daylight Saving ends" value="2016/11/6" type="informational" />
<date name="Daylight Saving ends" value="2017/11/5" type="informational" />
<date name="Daylight Saving ends" value="2018/11/4" type="informational" />
<date name="Daylight Saving ends" value="2019/11/3" type="informational" />
<date name="Easter" value="1999/4/4" type="religious" />
<date name="Easter" value="2000/4/25" type="religious" />
<date name="Easter" value="2001/4/15" type="religious" />
<date name="Easter" value="2002/3/31" type="religious" />
<date name="Easter" value="2003/4/20" type="religious" />
<date name="Easter" value="2004/4/11" type="religious" />
<date name="Easter" value="2005/3/27" type="religious" />
<date name="Easter" value="2006/4/16" type="religious" />
<date name="Easter" value="2007/4/8" type="religious" />
<date name="Easter" value="2008/3/23" type="religious" />
<date name="Easter" value="2009/4/12" type="religious" />
<date name="Easter" value="2010/4/4" type="religious" />
<date name="Easter" value="2011/4/24" type="religious" />
<date name="Easter" value="2012/4/8" type="religious" />
<date name="Easter" value="2013/3/31" type="religious" />
<date name="Easter" value="2014/4/20" type="religious" />
<date name="Easter" value="2015/4/5" type="religious" />
<date name="Easter" value="2016/3/27" type="religious" />
<date name="Easter" value="2017/4/16" type="religious" />
<date name="Easter" value="2018/4/1" type="religious" />
<date name="Easter" value="2019/4/21" type="religious" />
<date name="Ash Wednesday" value="1999/2/17" type="religious" />
<date name="Ash Wednesday" value="1999/2/17" type="religious" />
<date name="Ash Wednesday" value="2000/3/8" type="religious" />
<date name="Ash Wednesday" value="2001/2/28" type="religious" />
<date name="Ash Wednesday" value="2002/2/13" type="religious" />
<date name="Ash Wednesday" value="2003/3/5" type="religious" />
<date name="Ash Wednesday" value="2004/2/25" type="religious" />
<date name="Ash Wednesday" value="2005/2/9" type="religious" />
<date name="Ash Wednesday" value="2006/3/1" type="religious" />
<date name="Ash Wednesday" value="2007/2/21" type="religious" />
<date name="Ash Wednesday" value="2008/2/6" type="religious" />
<date name="Ash Wednesday" value="2009/2/25" type="religious" />
<date name="Ash Wednesday" value="2010/2/17" type="religious" />
<date name="Ash Wednesday" value="2011/3/9" type="religious" />
<date name="Ash Wednesday" value="2012/2/22" type="religious" />
<date name="Ash Wednesday" value="2013/2/13" type="religious" />
<date name="Ash Wednesday" value="2014/3/5" type="religious" />
<date name="Ash Wednesday" value="2015/2/18" type="religious" />
<date name="Ash Wednesday" value="2016/2/10" type="religious" />
<date name="Ash Wednesday" value="2017/3/1" type="religious" />
<date name="Ash Wednesday" value="2018/2/14" type="religious" />
<date name="Ash Wednesday" value="2019/3/6" type="religious" />
<date name="Passover" value="2005/4/24" type="religious" />
<date name="Passover" value="2006/4/13" type="religious" />
<date name="Passover" value="2007/4/03" type="religious" />
<date name="Passover" value="2008/4/20" type="religious" />
<date name="Passover" value="2009/4/09" type="religious" />
<date name="Passover" value="2010/3/30" type="religious" />
<date name="Passover" value="2011/4/19" type="religious" />
<date name="Yom Kippur" value="2005/10/13" type="religious" />
<date name="Yom Kippur" value="2006/10/02" type="religious" />
<date name="Yom Kippur" value="2007/9/27" type="religious" />
<date name="Yom Kippur" value="2008/10/09" type="religious" />
<date name="Yom Kippur" value="2009/09/28" type="religious" />
<date name="Yom Kippur" value="2010/09/18" type="religious" />
<date name="Hanukkah begins" value="2004/12/07" type="religious" />
<date name="Hanukkah begins" value="2005/12/25" type="religious" />
<date name="Hanukkah begins" value="2006/12/15" type="religious" />
<date name="Hanukkah begins" value="2007/12/04" type="religious" />
<date name="Hanukkah begins" value="2008/12/21" type="religious" />
<date name="Hanukkah begins" value="2009/12/11" type="religious" />
<date name="Hanukkah begins" value="2010/12/01" type="religious" />
<date name="Ramadan begins" value="2006/09/24" type="religious" />
<date name="Ramadan begins" value="2007/09/13" type="religious" />
<date name="Ramadan begins" value="2008/09/2" type="religious" />
<date name="Ramadan begins" value="2009/08/22" type="religious" />
<date name="Kwanzaa begins" value="*/12/26" type="religious" />
<date name="Cinco de Mayo" value="*/5/5" type="secular" />
</country>
</calendar>

View File

@ -78,6 +78,7 @@ from DateHandler import displayer as _dd
from DateHandler import parser as _dp
import libholiday
from libholiday import g2iso as _gramps2iso
#------------------------------------------------------------------------
#
@ -242,7 +243,7 @@ class WebCalReport(Report):
# These things are: birthdays and anniversaries
self.calendar = {}
calendar.setfirstweekday(_dow_gramps2iso[self.start_dow])
calendar.setfirstweekday(dow_gramps2iso[self.start_dow])
def copy_file(self, from_fname, to_fname, to_dir=''):
"""
@ -303,9 +304,17 @@ class WebCalReport(Report):
for day in range(1, 32):
holiday_names = holiday_table.get_holidays(month, day)
for holiday_name in holiday_names:
self.add_holiday_item(holiday_name, year, month, day)
self.add_holiday_item(holiday_name, month, day)
def add_holiday_item(self, text, month, day):
"""
add holiday to its dictionary
text -- holiday title
month -- month of holiday
day -- day of holiday
"""
def add_holiday_item(self, text, year, month, day):
if day == 0:
# This may happen for certain "about" dates.
day = 1 # Use first day of the month
@ -518,8 +527,8 @@ class WebCalReport(Report):
start_dow = self.start_dow
col2day = [(x-1)%7+1 for x in range(start_dow, start_dow + 7)]
# Translate a Gramps day number into a HTMLclass
def get_class_for_daycol(col):
""" Translate a Gramps day number into a HTMLclass """
day = col2day[col]
if day == 1:
return "weekend sunday"
@ -528,6 +537,7 @@ class WebCalReport(Report):
return "weekday"
def get_name_for_daycol(col):
""" Translate a Gramps day number into a HTMLclass """
day = col2day[col]
return day_names[day]
@ -610,34 +620,41 @@ class WebCalReport(Report):
# "One Day" calendar page filename
two_digit_month = '%02d' % month
two_digit_day = '%02d' % day
fname_date = str(year) + str(two_digit_month) + str(two_digit_day)
fname_date = str(year) + str(two_digit_month) \
+ str(two_digit_day)
# create web link to corresponding "One Day" page...
# create web link to corresponding
# "One Day" page...
# The HREF is relative to the year path.
fname_date = '/'.join([full_month_name, fname_date])
fname_date += self.ext
of.write('\t\t\t\t<a href="%s" title="%s%d">\n'
% (fname_date, abbr_month_name, day))
of.write('\t\t\t\t\t<div class="date">%d</div></a>\n' % day)
of.write('\t\t\t\t\t<div class="date">'
'%d</div></a>\n' % day)
one_day_cal = "OneDay"
# WebCal
else:
one_day_cal = "WebCal"
of.write('\t\t\t\t<div class="date">%d</div>\n' % day)
of.write('\t\t\t\t<div class="date">'
'%d</div>\n' % day)
# both WebCal and Year_Glance needs day_list displayed
# both WebCal and Year_Glance needs
# day_list displayed
self.one_day(of, event_date, one_day_cal, day_list)
# no holiday/ bday/ anniversary this day
else:
of.write('class="%s">\n' % dayclass)
of.write('\t\t\t\t<div class="date">%d</div>\n' % day)
of.write('\t\t\t\t<div class="date">'
'%d</div>\n' % day)
# no holiday/ bday/ anniversary this month
else:
of.write('class="%s">\n' % dayclass)
of.write('\t\t\t\t<div class="date">%d</div>\n' % day)
of.write('\t\t\t\t<div class="date">'
'%d</div>\n' % day)
# close the day/ column
of.write('\t\t\t</td>\n')
@ -755,9 +772,10 @@ class WebCalReport(Report):
return of
def close_file(self, of):
""" will close whatever filename is passed to it """
of.close()
def one_day(self, of, event_date, one_day_cal, day_list):
def one_day(self, one_day_fname, event_date, one_day_cal, day_list):
"""
This method creates the One Day page for "Year At A Glance"
@ -784,7 +802,7 @@ class WebCalReport(Report):
two_digit_day = '%02d' % day
fname_date = str(year) + str(two_digit_month) + str(two_digit_day)
# define names for long month
# define name for long month
full_month_name = get_full_month_name(month)
# Name the file, and create it (see code in calendar_build)
@ -807,19 +825,21 @@ class WebCalReport(Report):
self.calendar_common(one_day_fname, nr_up, year, full_month_name, title)
one_day_fname.write('\t<h3 id="OneDay">%s</h3>\n' % pg_date)
of = one_day_fname # because of two different fnames needing
#of = one_day_fname # because of two different fnames needing
# to access this variable
# for both "WebCal" and "One Day"
of.write('\t\t\t\t\t<ul>\n')
one_day_fname.write('\t\t\t\t\t<ul>\n')
for nyears, date, text, event in day_list:
of.write('\t\t\t\t\t\t<li>%s</li>\n' % text)
of.write('\t\t\t\t\t</ul>\n')
one_day_fname.write('\t\t\t\t\t\t<li>%s</li>\n' % text)
one_day_fname.write('\t\t\t\t\t</ul>\n')
# if calendar is one_day(), write footer, and close the file
# if calendar is one_day(), write_footer() and close_file()
if one_day_cal == "OneDay":
self.write_footer(of, nr_up)
self.close_file(of)
self.write_footer(one_day_fname, nr_up)
self.close_file(one_day_fname)
return one_day_fname
def year_glance(self, year):
"""
@ -846,7 +866,6 @@ class WebCalReport(Report):
# page description
year_glance_fname.write('<div class="content">\n')
year_glance_fname.write('<p id="description">\n')
# TODO. The "red square" is only valid for some style sheets.
year_glance_fname.write(_('This calendar is meant to give you access '
'to all your data at a glance compressed into one page. Clicking '
'on a date will take you to a page that shows all the events for '
@ -1162,16 +1181,20 @@ class WebCalOptions(MenuReportOptions):
cright.set_help( _("The copyright to be used for the web files"))
menu.add_option(category_name, "cright", cright)
encoding = EnumeratedListOption(_('Character set encoding'), _CHARACTER_SETS[0][1])
encoding = EnumeratedListOption(_('Character set encoding'), \
_CHARACTER_SETS[0][1])
for eopt in _CHARACTER_SETS:
encoding.add_item(eopt[1], eopt[0])
encoding.set_help( _("The encoding to be used for the web files"))
encoding.set_help( _('The encoding to be used for '
'the web files'))
menu.add_option(category_name, "encoding", encoding)
css = EnumeratedListOption(_('StyleSheet'), _CSS_FILES[0][1])
css = EnumeratedListOption(_('StyleSheet'), \
_CSS_FILES[0][1])
for style in _CSS_FILES:
css.add_item(style[1], style[0])
css.set_help( _("The Style Sheet to be used for the web page"))
css.set_help( _('The Style Sheet to be used '
'for the web page'))
menu.add_option(category_name, "css", css)
def __add_content_options(self, menu):
@ -1185,24 +1208,33 @@ class WebCalOptions(MenuReportOptions):
today = time.localtime()
today = datetime.date(today[0], today[1], today[2])
self.__multiyear = BooleanOption(_('Create multiple year calendars'), False)
self.__multiyear.set_help(_('Whether to create Multiple year calendars or not.'))
self.__multiyear = BooleanOption(_('Create multiple year '
'calendars'), False)
self.__multiyear.set_help(_('Whether to create Multiple year '
'calendars or not.'))
menu.add_option(category_name, 'multiyear', self.__multiyear)
self.__multiyear.connect('value-changed', self.__multiyear_changed)
self.__start_year = NumberOption(_('Start Year for the Calendar(s)'), today.year, 1900, 3000)
self.__start_year.set_help(_('Enter the starting year for the calendars between 1900 - 3000'))
self.__start_year = NumberOption(_('Start Year for the '
'Calendar(s)'), today.year, 1900, 3000)
self.__start_year.set_help(_('Enter the starting year for the calendars '
'between 1900 - 3000'))
menu.add_option(category_name, 'start_year', self.__start_year)
self.__end_year = NumberOption(_('End Year for the Calendar(s)'), today.year, 1900, 3000)
self.__end_year.set_help(_('Enter the ending year for the calendars between 1900 - 3000.'
' if multiple years is selected, then only twenty years at any given time'))
self.__end_year = NumberOption(_('End Year for the '
'Calendar(s)'), today.year, 1900, 3000)
self.__end_year.set_help(_('Enter the ending year for the calendars '
'between 1900 - 3000. if multiple years '
'is selected, then only twenty years at any '
'given time'))
menu.add_option(category_name, 'end_year', self.__end_year)
self.__multiyear_changed()
fullyear = BooleanOption(_('Create "Year At A Glance" Calendar(s)'), False)
fullyear.set_help(_('Whether to create A one-page mini calendar with dates highlighted'))
fullyear = BooleanOption(_('Create "Year At A Glance" '
'Calendar(s)'), False)
fullyear.set_help(_('Whether to create A one-page mini calendar '
'with dates highlighted'))
menu.add_option(category_name, 'fullyear', fullyear)
country = EnumeratedListOption(_('Country for holidays'), 0 )
@ -1214,8 +1246,10 @@ class WebCalOptions(MenuReportOptions):
menu.add_option(category_name, "country", country)
maiden_name = EnumeratedListOption(_("Birthday surname"), "own")
maiden_name.add_item("spouse_first", _("Wives use husband's surname (from first family listed)"))
maiden_name.add_item("spouse_last", _("Wives use husband's surname (from last family listed)"))
maiden_name.add_item('spouse_first', _("Wives use husband's surname "
"(from first family listed)"))
maiden_name.add_item('spouse_last', _("Wives use husband's surname "
"(from last family listed)"))
maiden_name.add_item("own", _("Wives use their own surname"))
maiden_name.set_help(_("Select married women's displayed surname"))
menu.add_option(category_name, "maiden_name", maiden_name)
@ -1349,27 +1383,31 @@ def _get_regular_surname(sex, name):
return surname
def _get_short_name(person, maiden_name=None):
""" Return person's name, unless maiden_name given, unless married_name listed. """
""" Return person's name, unless maiden_name given,
unless married_name listed. """
# Get all of a person's names:
primary_name = person.get_primary_name()
sex = person.get_gender()
married_name = None
names = [primary_name] + person.get_alternate_names()
for n in names:
if int(n.get_type()) == gen.lib.NameType.MARRIED:
married_name = n
for name in names:
if int(name.get_type()) == gen.lib.NameType.MARRIED:
married_name = name
# Now, decide which to use:
if maiden_name is not None:
if married_name is not None:
first_name, family_name = married_name.get_first_name(), _get_regular_surname(sex, married_name)
first_name, family_name = married_name.get_first_name(), \
_get_regular_surname(sex, married_name)
call_name = married_name.get_call_name()
else:
first_name, family_name = primary_name.get_first_name(), maiden_name
first_name, family_name = primary_name.get_first_name(), \
maiden_name
call_name = primary_name.get_call_name()
else:
first_name, family_name = primary_name.get_first_name(), _get_regular_surname(sex, primary_name)
first_name, family_name = primary_name.get_first_name(), \
_get_regular_surname(sex, primary_name)
call_name = primary_name.get_call_name()
# If they have a nickname use it
@ -1378,29 +1416,33 @@ def _get_short_name(person, maiden_name=None):
else: # else just get the first name:
first_name = first_name.strip()
if " " in first_name:
first_name, rest = first_name.split(" ", 1) # just one split max
# just one split max
first_name, rest = first_name.split(" ", 1)
return ("%s %s" % (first_name, family_name)).strip()
# Simple utility list to convert Gramps day-of-week numbering to calendar.firstweekday numbering
_dow_gramps2iso = [ -1, calendar.SUNDAY, calendar.MONDAY, calendar.TUESDAY, calendar.WEDNESDAY, calendar.THURSDAY, calendar.FRIDAY, calendar.SATURDAY ]
def _gramps2iso(dow):
""" Convert GRAMPS day of week to ISO day of week """
# GRAMPS: SUN = 1
# ISO: MON = 1
return (dow + 5) % 7 + 1
# Simple utility list to convert Gramps day-of-week numbering
# to calendar.firstweekday numbering
dow_gramps2iso = [ -1,
calendar.SUNDAY,
calendar.MONDAY,
calendar.TUESDAY,
calendar.WEDNESDAY,
calendar.THURSDAY,
calendar.FRIDAY,
calendar.SATURDAY,
]
# define names for full and abbreviated month names in GrampsLocale
_full_month_name = GrampsLocale.long_months
_abbr_month_name = GrampsLocale.short_months
full_month_name = GrampsLocale.long_months
abbr_month_name = GrampsLocale.short_months
def get_full_month_name(month):
""" returns full or long month name """
return _full_month_name[month]
return full_month_name[month]
def get_short_month_name(month):
""" return short or abbreviated month name """
return _abbr_month_name[month]
return abbr_month_name[month]
def get_day_list(event_date, holiday_list, bday_anniv_list):
"""
@ -1427,9 +1469,9 @@ def get_day_list(event_date, holiday_list, bday_anniv_list):
# will force holidays to be first in the list
nyears = 0
for p in holiday_list:
for line in p.splitlines():
day_list.append((nyears, event_date, line, _('Holiday')))
for event_name in holiday_list:
for line in event_name.splitlines():
day_list.append((nyears, event_date, line, 'Holiday'))
# birthday/ anniversary on this day
if bday_anniv_list > []:
@ -1525,7 +1567,7 @@ def get_previous_day(year, month, day_col):
prevmonth = calendar.monthcalendar(year, month-1)
num_weeks = len(prevmonth)
lastweek_prevmonth = prevmonth[num_weeks - 1]
previous_month_day= lastweek_prevmonth[day_col]
previous_month_day = lastweek_prevmonth[day_col]
return previous_month_day
def get_next_day(year, month, day_col):