apps/blagh: use new datei and datet functions
This commit is contained in:
		
							parent
							
								
									2f8c4cd8e8
								
							
						
					
					
						commit
						0928d102d5
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -26,7 +26,7 @@ fn blagh_init { | ||||||
|         if(check_user $conf_blog_editors) { |         if(check_user $conf_blog_editors) { | ||||||
|             editor_mode=on |             editor_mode=on | ||||||
|             if(~ $"post_arg_date '') |             if(~ $"post_arg_date '') | ||||||
|                 post_date=`{date -i|sed 's,-,/,g'}  # date -i is 9front/9base only |                 post_date=`{datei|sed 's,-,/,g'} | ||||||
|             if not |             if not | ||||||
|                 post_date=$post_arg_date |                 post_date=$post_arg_date | ||||||
|             ll_add handlers_bar_left echo '<a href="'$blagh_uri'new_post">Make a new post</a>' |             ll_add handlers_bar_left echo '<a href="'$blagh_uri'new_post">Make a new post</a>' | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
| fn statpost { | fn statpost { | ||||||
|     f = $1 |     f = $1 | ||||||
| 
 | 
 | ||||||
|     updated = `{date -t `{mtime $f | awk '{print $1}'}} # date -t is 9front/9base only |     updated = `{datet `{mtime $f | awk '{print $1}'}} | ||||||
|     post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' |     post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' | ||||||
|     title=`{read $f/index.md} |     title=`{read $f/index.md} | ||||||
|     # Not used: date=`{/bin/date -Rd `{basename $f |sed 's/(^[0-9\-]*).*/\1/; s/-[0-9]$//'}} |     # Not used: date=`{/bin/date -Rd `{basename $f |sed 's/(^[0-9\-]*).*/\1/; s/-[0-9]$//'}} | ||||||
|  | @ -16,7 +16,7 @@ fn statpost { | ||||||
|     #ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } } |     #ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } } | ||||||
|     ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } } |     ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } } | ||||||
| } | } | ||||||
| updated = `{date -t} # date -t is 9front/9base only | updated = `{datet} | ||||||
| %} | %} | ||||||
| 
 | 
 | ||||||
| <feed xmlns="http://www.w3.org/2005/Atom" | <feed xmlns="http://www.w3.org/2005/Atom" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Stanley Lieber
						Stanley Lieber