Pmw.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:ecel 作者: ARL-UTEP-OC 项目源码 文件源码
def _changeDate(value, factor, increment, format = 'ymd',
        separator = '/', yyyy = 0):

  jdn = datestringtojdn(value, format, separator) + factor * increment

  y, m, d = jdntoymd(jdn)
  result = ''
  for index in range(3):
    if index > 0:
      result = result + separator
    f = format[index]
    if f == 'y':
      if yyyy:
        result = result + '%02d' % y
      else:
        result = result + '%02d' % (y % 100)
    elif f == 'm':
      result = result + '%02d' % m
    elif f == 'd':
      result = result + '%02d' % d

  return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号