Zom*_*Pie 3 javascript cypress
我们如何使用 DayJs 获取当前日期之前的日期。
我知道如何获取当前日期,但我们可以从当前日期删除 15 天吗?
cy.get('input[name="day"]').should('have.value', (Cypress.dayjs().format('DD')))
cy.get('input[name="month"]').should('have.value', (Cypress.dayjs().format('MM')))
cy.get('input[name="year"]').should('have.value', (Cypress.dayjs().format('YY'))) ```
This is my code for getting the currentDate. I would like to get 15 days before my current Date. I would have used substract if the date was one input field but here we have different placeholders for the inputs.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4298 次 |
最近记录: |