define.py 文件源码

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

项目:weasyl 作者: Weasyl 项目源码 文件源码
def age_in_years(birthdate):
    """
    Determines an age in years based off of the given arrow.Arrow birthdate
    and the current date.
    """
    now = arrow.now()
    is_upcoming = (now.month, now.day) < (birthdate.month, birthdate.day)

    return now.year - birthdate.year - int(is_upcoming)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号