def getComponentVersion(self):
monthDict = {'JAN':'01', 'FEB':'02', 'MAR':'03', 'APR':'04', 'MAY':'05', 'JUN':'06',
'JUL':'07', 'AUG':'08', 'SEP':'09', 'OCT':'10', 'NOV':'11', 'DEC':'12'}
# convert component version to standard versioning
ver, verDate = ghenv.Component.Message.split("\n")
ver = ver.split(" ")[1].strip()
month, day, year = verDate.split("_")
month = monthDict[month.upper()]
version = ".".join([year, month, day, ver])
return version
评论列表
文章目录