1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-15 08:09:11 +08:00

docs(api): add :h SpaceVim-api-time

This commit is contained in:
Shidong Wang 2021-10-22 23:04:16 +08:00
parent f022462a16
commit 3895d20589
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
2 changed files with 35 additions and 6 deletions

View File

@ -7,6 +7,21 @@
"=============================================================================
let s:self = {}
""
" @section time, api-time
" @parentsection api
" `time` api provides basic functions to get time information.
"
" current_time()
"
" get current time, the format is `%I:%M %p`
"
" current_date()
"
" get current date, the format is `%a %b %d`
" see: man 3 strftime
function! s:self.current_time() abort
return strftime('%I:%M %p')

View File

@ -218,12 +218,13 @@ CONTENTS *SpaceVim-contents*
9. prompt..........................................|SpaceVim-api-prompt|
10. sid...........................................|SpaceVim-api-vim-sid|
11. system.........................................|SpaceVim-api-system|
12. unicode#box...............................|SpaceVim-api-unicode-box|
13. vim#buffer.................................|SpaceVim-api-vim-buffer|
14. vim#buffer.................................|SpaceVim-api-vim-window|
15. vim#command...............................|SpaceVim-api-vim-command|
16. vim#compatible.........................|SpaceVim-api-vim-compatible|
17. vim#message...............................|SpaceVim-api-vim-message|
12. time.............................................|SpaceVim-api-time|
13. unicode#box...............................|SpaceVim-api-unicode-box|
14. vim#buffer.................................|SpaceVim-api-vim-buffer|
15. vim#buffer.................................|SpaceVim-api-vim-window|
16. vim#command...............................|SpaceVim-api-vim-command|
17. vim#compatible.........................|SpaceVim-api-vim-compatible|
18. vim#message...............................|SpaceVim-api-vim-message|
9. Development................................................|SpaceVim-dev|
1. commit-style-guide..................|SpaceVim-dev-commit-style-guide|
10. FAQ.......................................................|SpaceVim-faq|
@ -5053,6 +5054,19 @@ name()
Return the name of current os, availibel value is: linux, cygwin, windows and
mac.
==============================================================================
TIME *SpaceVim-api-time*
`time` api provides basic functions to get time information.
current_time()
get current time, the format is `%I:%M %p`
current_date()
get current date, the format is `%a %b %d`
==============================================================================
UNICODE#BOX *SpaceVim-api-unicode-box*