File tree Expand file tree Collapse file tree 1 file changed +1
-34
lines changed
src/Campaigns/resources/admin/components/CampaignFormModal Expand file tree Collapse file tree 1 file changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -18,44 +18,11 @@ import {getGiveCampaignsListTableWindowData} from '../CampaignsListTable';
1818import { amountFormatter } from '@givewp/campaigns/utils' ;
1919import TextareaControl from '../CampaignDetailsPage/Components/TextareaControl' ;
2020import { CampaignGoalInputAttributes , isValidGoalType } from '../../constants/goalInputAttributes' ;
21- import { formatToDateTimeLocalInput } from '@givewp/admin/common' ;
21+ import { formatToDateTimeLocalInput } from '@givewp/admin/common' ;
2222
2323const { currency, isRecurringEnabled} = getGiveCampaignsListTableWindowData ( ) ;
2424const currencyFormatter = amountFormatter ( currency ) ;
2525
26- /**
27- * Get the next sharp hour
28- *
29- * @since 4.0.0
30- */
31- const getNextSharpHour = ( hoursToAdd : number ) => {
32- const date = new Date ( ) ;
33- date . setHours ( date . getHours ( ) + hoursToAdd , 0 , 0 , 0 ) ;
34-
35- return date ;
36- } ;
37-
38- /**
39- * Format a given date to be used in datetime inputs
40- *
41- * @since 4.0.0
42- */
43- const getDateString = ( date : Date ) => {
44- const offsetInMilliseconds = date . getTimezoneOffset ( ) * 60 * 1000 ;
45- const dateWithOffset = new Date ( date . getTime ( ) - offsetInMilliseconds ) ;
46-
47- return removeTimezoneFromDateISOString ( dateWithOffset . toISOString ( ) ) ;
48- } ;
49-
50- /**
51- * Remove timezone from date string
52- *
53- * @since 4.0.0
54- */
55- const removeTimezoneFromDateISOString = ( date : string ) => {
56- return date . slice ( 0 , - 5 ) ;
57- } ;
58-
5926/**
6027 * @since 4.0.0
6128 */
You can’t perform that action at this time.
0 commit comments