腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(484)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
TypeError:(0,_
dayjs
.
Dayjs
)不是函数
我想现在就用
dayjs
替换一下momentjs。首先,我添加了依赖项:然后像这样导入
dayjs
:使用以下代码片段获取月份开始:const startOfCurrentMonth =
Dayjs
().sta
浏览 5
提问于2021-12-02
得票数 0
1
回答
用Jest模仿
dayjs
我是测试驱动开发的新手,我正在尝试实现我的简单测试,但jest总是发现我的
dayjs
不是一个函数。另外,我没有使用typescrcipt,所以我的问题类似于this。/MainDashboard"; return () => jest.requireActual("
dayjs
")("2020-01-01T00/main/apps/dashboards/main&
浏览 26
提问于2020-07-02
得票数 6
1
回答
用
dayjs
增加
dayjs
-重新出现插件类型
因此,我在
dayjs
-recur.d.ts中使用以下代码解决了这个问题 import { PluginFunc } from '
dayjs
'; export = defaultExport;虽然这还不足以满足LSP,但我还必须扩展
dayjs
命名空间通过查找,我得到了以下片段: declare module
浏览 15
修改于2022-09-14
得票数 0
回答已采纳
1
回答
有反应的
dayjs
--原生的--如何加载所有的
dayjs
地区?
import(`
dayjs
/locale/${currentLocale}`)
dayjs
.locale(currentLocale);得到了错误: 我想这更像是"web方式“--遵循,我理解我需要在编译时加载所有的
dayjs
语言环境。
浏览 15
修改于2022-08-18
得票数 1
1
回答
Dayjs
地区与反应
所以我试着用
dayjs
在我的React中显示德语的语言环境,但不起作用,这是我的代码,我试图添加locale('de'),但这不是工作,所以我不知道下一步该尝试什么。我正在努力学习如何去做,我不知道我是否需要导入一个地区,或者它是从“
dayjs
”开始的。import React, { Fragment, useContext, useEffect, useState } from 'react'; import
dayjs
from '
dayjs
';/u
浏览 9
提问于2022-05-07
得票数 0
1
回答
如何模拟
dayjs
时区
export function getTime(dateTime: string) {}import timezone from '
dayjs
/plugin/timezone'; describe('Fu
浏览 7
修改于2021-06-10
得票数 3
3
回答
使用
dayjs
获取beforeDate
如何使用
DayJs
获取当前日期之前的日期。 我知道如何获取当前日期,但我们可以从当前日期中删除15天吗?cy.get('input[name="day"]').should('have.value', (Cypress.
dayjs
().format('DD'))) cy.get('input[name="month"]').should('have.value', (Cypress.
dayjs
().fo
浏览 52
提问于2021-10-26
得票数 1
回答已采纳
1
回答
DayJS
格式:秒、分钟和小时
当我从hours minutes seconds获得diff值时,我想格式化
dayjs
。这是我的代码: newAppoint.occupied.push({ seconds:
dayjs
().diff(user.appointment, 'se
浏览 139
提问于2019-09-19
得票数 3
回答已采纳
2
回答
如何模拟
dayjs
链接的方法
我有今天的对象:我试着用玩笑来嘲弄它,但没有用。
dayjs
= jest.requireActual("
dayjs
"); .utc(args.filter((
浏览 26
修改于2020-07-15
得票数 7
回答已采纳
1
回答
如何在打字稿中使用
dayjs
import * as
dayjs
from '
dayjs
'再试一次successdebug ReferenceError: require is not defined build
浏览 25
提问于2022-06-10
得票数 0
回答已采纳
1
回答
dayJS
日期函数到PHP
我在
dayjs
中有下面的日期处理,我试图在PHP中复制它,但是失败了。我预计两人都将于2020年7月27日星期一返回。有人能帮忙吗?JS -2020年7月27日星期一返回 weekOneStart = firstOfMonth.clone().day
浏览 2
提问于2020-12-01
得票数 0
回答已采纳
2
回答
dayjs
()位于错误的时区
问题实际我尝试过的import utc from '
dayjs
/plugin/utc'; import timezone from '
dayjs
/plugin/t
浏览 9
修改于2021-08-10
得票数 2
1
回答
我可以扩展
Dayjs
类吗?
我想用这样的 format() {} 它返回'TypeError:未定义的类扩展值不是构造函数或
浏览 4
修改于2021-12-27
得票数 2
2
回答
dayjs
-不是一个函数
var
dayjs
= require("
dayjs
") for importVars.date1 =
dayjs
(whateverdate1("add", 2)).format('MMM D, YYYY') const date1 = Vars.date1
浏览 6
修改于2022-02-06
得票数 4
2
回答
如何使用
dayjs
获得日期范围?
cannot be applied to types 'boolean' and 'number'.(2365)import * as React from 'react';import './style.css'; const randomDay =
dayjs
('2022-09-1
浏览 10
修改于2022-09-12
得票数 0
回答已采纳
3
回答
模拟
DayJs
的默认函数及其链式方法
我试图用特定的日期和时间来模拟
dayjs
()默认函数,还想模拟它的嵌套方法,即utc()& .add()abc.ts: const/src/common/serviceFactory'; jest.fn((...args)=> jest.r
浏览 26
修改于2020-08-18
得票数 5
1
回答
dayjs
对象的类型是什么?
我正在使用ant设计日期选择器组件和
dayjs
作为日期库。下面的代码是实现的一部分。null); <div> <button onClick={() => setNow(
dayjs
我试过这种类型是null | typeof
dayjs
() 但这不管用。
浏览 15
提问于2022-10-12
得票数 0
回答已采纳
1
回答
如何使用
dayjs
的相对时间
嗨,伙计们,我在使用
Dayjs
相对时间时有个奇怪的问题var date = "2021-02-26 16:04:15";相对时间总是按预期增长的20 minutes ago, then increase to 21 minutes ago, then increase to 22 minutes agoimport r
浏览 5
修改于2021-02-26
得票数 1
5
回答
如何从
dayjs
https://www.npmjs.com/package/
dayjs
?中动态获取区域设置
当我使用like
dayjs
(date).locale('te').format('YYYY MMM DD')时,我会得到英文的月份值。要使用区域设置,我必须导入区域设置。import * as locale from '
dayjs
/locale/te'; 问题是我看不到一种动态导入语言环境的方法。我没有访问nodejs require()函数的权限。
浏览 126
修改于2020-10-28
得票数 5
1
回答
从
dayjs
对象的实例中获取时区?
我有一个util方法,它接受日期输入并将其转换为
dayjs
实例,而时区转换是可选的。import
dayjs
from '
dayjs
';import utc from '
dayjs
/plugin
dayjs
.extend(utc); if(isT
浏览 6
提问于2022-02-05
得票数 1
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券