Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function setUserLogout(time: string = format(new Date(), dateFormat)) {
auth.clearAllAppStorage();
return {
type: SET_USER_LOGOUT,
time,
isAuthenticated: false,
user: emptyUser,
};
}
// //////////////////////////////
})));
if (this.min && dateFns.differenceInMonths(this._visibleDate, this.min) === 0) {
this._togglePreviousButton(false);
} else {
this._togglePreviousButton();
}
if (this.max && dateFns.differenceInMonths(this._visibleDate, this.max) === 0) {
this._toggleNextButton(false);
} else {
this._toggleNextButton();
}
this._ui.navigation.month.innerHTML = dateFns.format(this._visibleDate, 'MMMM', {
locale: this.locale
});
this._ui.navigation.year.innerHTML = dateFns.format(this._visibleDate, 'YYYY', {
locale: this.locale
});
this._renderDays();
this._ui.body.dates.classList.add('is-active');
this._ui.body.months.classList.remove('is-active');
this._ui.body.years.classList.remove('is-active');
this._ui.navigation.previous.removeAttribute('disabled');
this._ui.navigation.next.removeAttribute('disabled');
return this;
}
}).map(day => (
))}
getFormattedDate = (arg = this.state.date, dateFormat) => {
if (isDate(arg) && dateFormat === undefined) {
return format(arg, this.props.defaultFormat)
}
if (typeof arg === 'string' && dateFormat === undefined) {
return format(this.state.date, arg)
}
if (isDate(arg) && typeof dateFormat === 'string') {
return format(arg, dateFormat)
}
misusageThrow('getFormattedDate')
}
const speakerSeries = speakerSegment.series.map((speakerSerie, speakerIndex) => {
const startZeroTime = new Date(1990, 8, 15);
const stopZeroTime = new Date(1990, 8, 15);
startZeroTime.setMilliseconds(speakerSerie.startTimeMs);
stopZeroTime.setMilliseconds(speakerSerie.stopTimeMs);
const speakerStartTime = startZeroTime.getTime();
const speakerStopTime = stopZeroTime.getTime();
const timeFormat = speakerSerie.startTimeMs >= 3600000 ? 'HH:mm:ss' : 'mm:ss';
const speakerTimingStart = format(speakerStartTime, timeFormat);
const speakerTimingStop = format(speakerStopTime, timeFormat);
const speakerGridKey = `speaker-edit-row-${speakerSerie.guid}`;
const speakerContent = (
type='block'>
{props.data.hash}
No. of transactions
{transactionCount()}
:
{format(new Date(props.data.timestamp * 1000), DATE_FORMAT)}
{props.data.number.toLocaleString()}
{props.data.hash}
var formatHour = function formatHour(date) {
if (dateFns.getMinutes(date) === 0) {
return dateFns.format(date, 'h');
}
return dateFns.format(date, 'h:m');
};
const toCartesianPlan = ([x, y]: TData) => ({
x: format(toDate(x), 'MMM/yy', { locale: ptBR }),
y
})
dateFormat(date) {
return dateFns.format(date, 'YYYY-MM-DD HH:mm:ss');
}
},
set minute(m) {
this.time = setMinutes(this.time, parseInt(m, 10));
this.dateChanged(
toDate(
format(this.date || new Date(), "yyyy-MM-dd") + "T" + format(this.time, "HH:mm:ss.000")
)
);
this.fireChange(true);
}
@computedFrom("time")