utils.py 文件源码

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

项目:django-souvenirs 作者: appsembler 项目源码 文件源码
def nearest_dom(year, month, day):
    """
    Return day adjusted as necessary to fit within the days available in
    year/month. For example:

        nearest_dom(2017, 2, 30)  #=> 28

    """
    return min(calendar.monthrange(year, month)[1], day)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号