mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 02:42:59 +00:00 
			
		
		
		
	
		
			
	
	
		
			13 lines
		
	
	
		
			356 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			13 lines
		
	
	
		
			356 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
|   | import dayjs, { type ConfigType } from 'dayjs' | ||
|  | import utc from 'dayjs/plugin/utc' | ||
|  | 
 | ||
|  | dayjs.extend(utc) | ||
|  | 
 | ||
|  | export const isAfter = (date: ConfigType, compare: ConfigType) => { | ||
|  |   return dayjs(date).isAfter(dayjs(compare)) | ||
|  | } | ||
|  | 
 | ||
|  | export const formatTime = ({ date, dateFormat }: { date: ConfigType; dateFormat: string }) => { | ||
|  |   return dayjs(date).format(dateFormat) | ||
|  | } |