This commit is contained in:
guanjihuan 2023-09-14 22:51:18 +08:00
parent 1e48c2cd16
commit 8359d41873
4 changed files with 27 additions and 3 deletions

View File

@ -523,6 +523,14 @@ guan.change_directory_by_replacement(current_key_word='code', new_key_word='data
# Module 14: others # Module 14: others
# time
# 获取当前日期
datetime_date = guan.get_date(bar=True)
# 获取当前时间
datetime_time = guan.get_time()
# stocks # stocks
# 获取所有股票 # 获取所有股票

View File

@ -1,7 +1,7 @@
[metadata] [metadata]
# replace with your username: # replace with your username:
name = guan name = guan
version = 0.0.175 version = 0.0.176
author = guanjihuan author = guanjihuan
author_email = guanjihuan@163.com author_email = guanjihuan@163.com
description = An open source python package description = An open source python package

View File

@ -1,6 +1,6 @@
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: guan Name: guan
Version: 0.0.175 Version: 0.0.176
Summary: An open source python package Summary: An open source python package
Home-page: https://py.guanjihuan.com Home-page: https://py.guanjihuan.com
Author: guanjihuan Author: guanjihuan

View File

@ -2,7 +2,7 @@
# With this package, you can calculate band structures, density of states, quantum transport and topological invariant of tight-binding models by invoking the functions you need. Other frequently used functions are also integrated in this package, such as file reading/writing, figure plotting, data processing. # With this package, you can calculate band structures, density of states, quantum transport and topological invariant of tight-binding models by invoking the functions you need. Other frequently used functions are also integrated in this package, such as file reading/writing, figure plotting, data processing.
# The current version is guan-0.0.175, updated on September 05, 2023. # The current version is guan-0.0.176, updated on September 14, 2023.
# Installation: pip install --upgrade guan # Installation: pip install --upgrade guan
@ -3096,6 +3096,22 @@ def change_directory_by_replacement(current_key_word='code', new_key_word='data'
# Module 14: others # Module 14: others
## time
# 获取当前日期
def get_date(bar=True):
import datetime
datetime_date = str(datetime.date.today())
if bar==False:
datetime_date = datetime_date.replace('-', '')
return datetime_date
# 获取当前时间
def get_time():
import datetime
datetime_time = datetime.datetime.now().strftime('%H:%M:%S')
return datetime_time
## stocks ## stocks
# 获取所有股票 # 获取所有股票