mirror of
https://github.com/strapi/strapi.git
synced 2025-07-21 07:57:45 +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;
|