date_render.py 文件源码

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

项目:time_extract 作者: blackbirdco 项目源码 文件源码
def nth_day_of_week(self, subtree):
        if subtree.label().startswith('first'):
            n = 0
        if subtree.label().startswith('second'):
            n = 1
        if subtree.label().startswith('third'):
            n = 2
        if subtree.label().startswith('fourth'):
            n = 3
        if subtree.label().startswith('fifth'):
            n = 4
        if subtree.label().startswith('sixth'):
            n = 5
        if subtree.label().startswith('seventh'):
            n = 6

        d = dt.today()
        self.dictionary['timestamp'] = self.next_weekday(d, n)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号