mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-26 23:51:10 +00:00 
			
		
		
		
	
		
			
	
	
		
			18 lines
		
	
	
		
			307 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			307 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|   | 'use strict'; | ||
|  | 
 | ||
|  | const { parseTime } = require('./shared/parsers'); | ||
|  | const Field = require('./field'); | ||
|  | 
 | ||
|  | class TimeField extends Field { | ||
|  |   toDB(value) { | ||
|  |     return parseTime(value); | ||
|  |   } | ||
|  | 
 | ||
|  |   fromDB(value) { | ||
|  |     // make sure that's a string with valid format ?
 | ||
|  |     return value; | ||
|  |   } | ||
|  | } | ||
|  | 
 | ||
|  | module.exports = TimeField; |