Renames function to say what it 'does'

This commit is contained in:
emelko
2019-04-25 11:01:33 +02:00
parent 6577038f22
commit dc5b34546a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -8,6 +8,6 @@ export default function (date) {
return formattedDate.toLowerCase()
}
export function dateForShortDescription (date) {
export function formatDateForShortText (date) {
return moment(date.toString()).format('dddd, MMMM Do')
}
+2 -2
View File
@@ -16,7 +16,7 @@ import { getFertilityStatusForDay } from '../lib/sympto-adapter'
import styles, { cycleDayColor, periodColor, secondaryColor } from '../styles'
import AppText from './app-text'
import Button from './button'
import { dateForShortDescription } from './helpers/format-date'
import { formatDateForShortText } from './helpers/format-date'
const ShowMoreToggler = ({ isShowingMore, onToggle }) => {
const {height, width} = Dimensions.get('window')
@@ -194,7 +194,7 @@ function determinePredictionText(bleedingPrediction) {
}
if (todayDate.isAfter(predictedBleedingEnd)) {
return predictLabels.predictionInPast(
dateForShortDescription(predictedBleedingStart), dateForShortDescription(predictedBleedingEnd)
formatDateForShortText(predictedBleedingStart), formatDateForShortText(predictedBleedingEnd)
)
}
const daysToEnd = todayDate.until(predictedBleedingEnd, ChronoUnit.DAYS)