<jupyter_start><jupyter_text>Test for time 3rd-party module maya when pendulum moment<jupyter_code># -*- coding:utf-8 -*-
# import lib
import maya  
import pendulum
import when
# import moment:require more than one package
# current date and year and week
##when
whToday = when.today()
whTodayYear = whToday.year
#no week num
whTodayWeekday = whToday.isoweekday()
whTodayFmt=when.format(whToday,"%Y-%m-%d-%A")
print(whToday)
print(whTodayYear)
print(whTodayWeekday)
print(whTodayFmt)

##maya
myToday = maya.now()
myTodayYear = myToday.year
myTodayWeekNum = myToday.week
myTodayWeekday = myToday.weekday
myTodayFmt = format(myToday,"%Y-%m-%d-%A")
print(myToday)
print(myTodayYear)
print(myTodayWeekNum)
print(myTodayWeekday)
print(myTodayFmt)
## hard to code

##pendulum
pdToday = pendulum.today()
pdTodayYear = pdToday.year
pdTodayWeekNum = pdToday.week_of_year
pdTodayWeekDay = pdToday.isoweekday()
pdTodayFmt=format(pdToday,"%Y-%m-%d-%A")
print(pdToday)
print(pdTodayYear)
print(pdTodayWeekNum)
print(pdTodayWeekDay)
print(pdTodayFmt)
#current time and minute
## when
whNow = when.now()
whNowMin = whNow.minute
whNowFmt = format(whNow,"%H:%M:%S")
print(whNow)
print(whNowMin)
print(whNowFmt)
## maya
myNow = maya.now()
myNowMin = myNow.minute
print(myNow)
print(myNowMin)

## pendulum
pdNow = pendulum.now()
pdNowMin = pdNow.minute
print(pdNow)
print(pdNowMin)

#time ibterval
##when
myDateInt = maya.now()-maya.when("yesterday")
print(myDateInt)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13396481732070364, 'fraction_numerical': 0.0013531799729364006, 'mean_word_length': 7.038043478260869, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '644559', 'license': 'MIT', 'n_tokens_mistral': 616, 'n_tokens_neox': 567, 'n_words': 113, 'path': 't.ipynb', 'repo_name': 'AndrewLauu/CodeLib', 'size': '1478'}