Skip to content

Commit

Permalink
Use native Date instead of moment
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshd16 committed Dec 18, 2020
1 parent aadad89 commit 6a84407
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client/my-sites/marketing/ultimate-traffic-guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { Button, CompactCard } from '@automattic/components';
* Internal dependencies
*/
import QueryUserPurchases from 'calypso/components/data/query-user-purchases';
import { useLocalizedMoment } from 'calypso/components/localized-moment';
import { getProductCost, isProductsListFetching } from 'calypso/state/products-list/selectors';
import { isFetchingUserPurchases, getUserPurchases } from 'calypso/state/purchases/selectors';
import { getCurrentUserCurrencyCode, getCurrentUserId } from 'calypso/state/current-user/selectors';
Expand Down Expand Up @@ -84,7 +83,6 @@ const SalesPage = ( { translate } ) => {
const isLoading = useSelector( ( state ) => isProductsListFetching( state ) );
const siteId = useSelector( ( state ) => getSelectedSiteId( state ) );
const siteSlug = useSelector( ( state ) => getSiteSlug( state, siteId ) );
const moment = useLocalizedMoment();

/**
* The reference cost is calculated to the nearest 100
Expand Down Expand Up @@ -114,7 +112,7 @@ const SalesPage = ( { translate } ) => {
{ translate(
'We developed this 96 page guide to teach you every modern website traffic trick you need to know in %(currentYear)s and beyond.',
{
args: { currentYear: moment().format( 'YYYY' ) },
args: { currentYear: new Date().getFullYear() },
}
) }
</p>
Expand Down

0 comments on commit 6a84407

Please sign in to comment.