Don't take month and day names from calendar.py: a buggy Metrowerks strftime() made this crash hard in Python 2.2.

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@137 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
Just 2001-06-27 23:09:57 +00:00
parent b68a700595
commit 64892f5a34

View File

@ -2,7 +2,6 @@ import DefaultTable
import sstruct import sstruct
import time import time
import string import string
import calendar
from fontTools.misc.textTools import safeEval, num2binary, binary2num from fontTools.misc.textTools import safeEval, num2binary, binary2num
@ -106,8 +105,9 @@ def calc_mac_epoch_diff():
mac_epoch_diff = calc_mac_epoch_diff() mac_epoch_diff = calc_mac_epoch_diff()
_months = map(string.lower, calendar.month_abbr) _months = [' ', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug',
_weekdays = map(string.lower, calendar.day_abbr) 'sep', 'oct', 'nov', 'dec']
_weekdays = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
def parse_date(datestring): def parse_date(datestring):
datestring = string.lower(datestring) datestring = string.lower(datestring)