summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/components
diff options
context:
space:
mode:
authorSatsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>2019-07-25 01:36:48 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-07-25 01:36:48 +0900
commit88f5e8e8e2ae759597387f69d579d5915d966b66 (patch)
treeb1534e994e464c194fce9122fe60e8f0546e2730 /src/client/app/common/views/components
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadmisskey-88f5e8e8e2ae759597387f69d579d5915d966b66.tar.gz
misskey-88f5e8e8e2ae759597387f69d579d5915d966b66.tar.bz2
misskey-88f5e8e8e2ae759597387f69d579d5915d966b66.zip
Bye moment from package.json (#5215)
* Bye moment from package.json * Use Mapped types for argument type definition
Diffstat (limited to 'src/client/app/common/views/components')
-rw-r--r--src/client/app/common/views/components/poll-editor.vue8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/poll-editor.vue b/src/client/app/common/views/components/poll-editor.vue
index 49940134c7..51c73003d1 100644
--- a/src/client/app/common/views/components/poll-editor.vue
+++ b/src/client/app/common/views/components/poll-editor.vue
@@ -52,9 +52,11 @@
<script lang="ts">
import Vue from 'vue';
-import * as moment from 'moment';
import i18n from '../../../i18n';
import { erase } from '../../../../../prelude/array';
+import { addTimespan } from '../../../../../prelude/time';
+import { formatDateTimeString } from '../../../../../misc/format-time-string';
+
export default Vue.extend({
i18n: i18n('common/views/components/poll-editor.vue'),
data() {
@@ -62,7 +64,7 @@ export default Vue.extend({
choices: ['', ''],
multiple: false,
expiration: 'infinite',
- atDate: moment().add(1, 'day').toISOString().split('T')[0],
+ atDate: formatDateTimeString(addTimespan(new Date(), 1, 'days'), 'yyyy-MM-dd'),
atTime: '00:00',
after: 0,
unit: 'second'
@@ -95,7 +97,7 @@ export default Vue.extend({
get() {
const at = () => {
- return moment(`${this.atDate} ${this.atTime}`).valueOf();
+ return new Date(`${this.atDate} ${this.atTime}`).getTime();
};
const after = () => {