@@ -148,40 +148,6 @@ <h4 id="minimatch"><a href="https://on.cypress.io/minimatch">Cypress.minimatch</
148148
149149 < div class ="col-xs-12 "> < hr > </ div >
150150
151- < div class ="col-xs-7 ">
152- < h4 id ="moment "> < a href ="https://on.cypress.io/moment "> Cypress.moment()</ a > </ h4 >
153- < p > To parse or format a date using a moment method, use the < a href ="https://on.cypress.io/moment "> < code > Cypress.moment()</ code > </ a > command.</ p >
154- < pre > < code class ="javascript "> const time = Cypress.moment().utc('2014-04-25T19:38:53.196Z').format('h:mm A')
155-
156- cy.get('.utility-moment').contains('3:38 PM')
157- .should('have.class', 'badge')
158-
159- // the time in the element should be between 3pm and 5pm
160- const start = Cypress.moment('3:00 PM', 'LT')
161- const end = Cypress.moment('5:00 PM', 'LT')
162-
163- cy.get('.utility-moment .badge')
164- .should(($el) => {
165- // parse American time like "3:38 PM"
166- const m = Cypress.moment($el.text().trim(), 'LT')
167-
168- // display hours + minutes + AM|PM
169- const f = 'h:mm A'
170-
171- expect(m.isBetween(start, end),
172- `${m.format(f)} should be between ${start.format(f)} and ${end.format(f)}`).to.be.true
173- })</ code > </ pre >
174- </ div >
175- < div class ="col-xs-5 ">
176- < div class ="well ">
177- < div class ="utility-moment "> Posted at
178- < span class ="badge badge-primary "> 3:38 PM</ span >
179- </ div >
180- </ div >
181- </ div >
182-
183- < div class ="col-xs-12 "> < hr > </ div >
184-
185151 < div class ="col-xs-12 ">
186152 < h4 id ="Promise "> < a href ="https://on.cypress.io/promise "> Cypress.Promise</ a > </ h4 >
187153 < p > To instantiate a new bluebird promise, use < a href ="https://on.cypress.io/promise "> < code > Cypress.Promise</ code > </ a > .</ p >
0 commit comments