def from_ad_date(cls, date):
        """ Gets a NepDate object from gregorian calendar date """
        functions.check_valid_ad_range(date)
        days = values.START_EN_DATE - date

        # Add the required number of days to the start nepali date
        start_date = NepDate(values.START_NP_YEAR, 1, 1)
        # No need to update as addition already calls update
        return start_date + (date - values.START_EN_DATE)
def from_ad_date ( cls , date ) : functions . check_valid_ad_range ( date ) days = values . START_EN_DATE - date start_date = NepDate ( values . START_NP_YEAR , 1 , 1 ) return start_date + ( date - values . START_EN_DATE )
Gets a NepDate object from gregorian calendar date