profile
viewpoint
Ali aligg Redwood City, CA https://www.linkedin.com/in/aliglenesk/ Software engineer @ Curai Health, formerly at YouTube

aligg/Code-Newbie-Tweets 10

Project to collect #codenewbie tweets, display them in a webapp, create a new api endpoint, and inspire more first-time open source contributors!

aligg/Fullstack-D3-and-Data-Visualization 2

Code for completing Amelia Wattenberger's Fullstack D3 book

aligg/Content-Review-Tool 1

Content review tool (CRT) software useful for anyone wanting to review content in bulk or apply labels to large datasets.

aligg/about 0

Sourcegraph blog, feature announcements, and website (about.sourcegraph.com)

aligg/advanced-react-patterns-v2 0

Created with CodeSandbox

aligg/advent-of-code-2019 0

https://adventofcode.com/

aligg/Albums-App 0

Project to learn react-native along with Stephen Grider's Udemy course.

aligg/Algorithms-DataStructures-BigONotation 0

Big O notation cheatsheets. algorithms and data structures explanations and implementations

aligg/animal-app 0

Small project to get started learning node.js & koa

startedmanarateam/soft-skills-training

started time in 20 days

issue commentreact-native-community/datetimepicker

Date picker on iOS has different selected value then Date received in onChange callback

Hi -

We were also struggling with timezone related "date jumping" issues. Specifically, we had two issues:

  1. during selection in the picker, sometimes the date would jump back one
  2. after selection and clicking done, the date would change to back one

Because the DateTimePicker requires to receive the date in Date format, but our app generally deals with and stores the date as a string, our working assumption was that a lot of these issues were related to converting between strings and javascript Date(), and timezone related issues cropping up in the process.

In our original code, we wrote custom code to inject timezone into the string and pass to Date(). After a long struggle bus of debugging, we found this helpful article which led us to the fix: https://medium.com/@lefloh/react-native-and-the-jumping-datepicker-853070554fb4

Root cause - essentially it seems that the timezone handling within React Native Javascript core itself is unreliable (so doing things like new Date().getTimezoneOffset()) were producing unreliable results.

The fix - use moment js to injectTimezone if you have to convert between date strings and date objects. To give you a sense, in the end some key code in our component looks like this:

// This will format your date into a string e.g. "2020-08-11"
const getFormattedDate = (selectedDate) => {
    return `${selectedDate.getFullYear()}-${padDateValue(
        selectedDate.getMonth() + 1,
    )}-${padDateValue(selectedDate.getDate())}`;
};

// This will inject the current timezone into your dateString and return a date
const injectTimezone = (dateString) => {
    return moment.tz(dateString, moment.tz.guess()).toDate();
};

Hope this is helpful!

kumien

comment created time in a month

issue commentreact-native-community/datetimepicker

Time picker sometimes resets value to previous value after change

Hi -

We were also struggling with timezone related "date jumping" issues. Specifically, we had two issues:

  1. during selection in the picker, sometimes the date would jump back one
  2. after selection and clicking done, the date would change to back one

Because the DateTimePicker requires to receive the date in Date format, but our app generally deals with and stores the date as a string, our working assumption was that a lot of these issues were related to converting between strings and javascript Date(), and timezone related issues cropping up in the process.

In our original code, we wrote custom code to inject timezone into the string and pass to Date(). After a long struggle bus of debugging, we found this helpful article which led us to the fix: https://medium.com/@lefloh/react-native-and-the-jumping-datepicker-853070554fb4

Root cause - essentially it seems that the timezone handling within React Native's javascript core is unreliable (so doing things like new Date().getTimezoneOffset()) were producing unreliable results.

The fix - use moment js to injectTimezone if you have to convert between date strings and date objects. To give you a sense, in the end some key code in our component looks like this:

// This will format your date into a string e.g. "2020-08-11"
const getFormattedDate = (selectedDate) => {
    return `${selectedDate.getFullYear()}-${padDateValue(
        selectedDate.getMonth() + 1,
    )}-${padDateValue(selectedDate.getDate())}`;
};

// This will inject the current timezone into your dateString and return a date
const injectTimezone = (dateString) => {
    return moment.tz(dateString, moment.tz.guess()).toDate();
};

Hope this is helpful!

bitttttten

comment created time in a month

push eventaligg/flexi-form

aligg

commit sha e9c60bd3ddd71b5beaa5d1b75de06683e9223860

one more readme update

view details

push time in 2 months

push eventaligg/flexi-form

aligg

commit sha 19a45c473a4123b7455e0f5ec33bd7be0f53d1f4

use input1

view details

aligg

commit sha 97018bad99fe357d51347d1049498a7685afcc6e

a few more comments for clarity and remove stray line

view details

push time in 2 months

pull request commentaligg/flexi-form

Bump websocket-extensions from 0.1.3 to 0.1.4

@dependabot merge

dependabot[bot]

comment created time in 2 months

push eventaligg/flexi-form

aligg

commit sha dc28e3ead336396577cc6d300adf3519c844468f

colon

view details

push time in 2 months

push eventaligg/flexi-form

aligg

commit sha a2d3df908718c7135eb68372707e90f2974c5f48

fix images being formatted poorly in readme

view details

push time in 2 months

push eventaligg/flexi-form

aligg

commit sha 13f3458703533a119e52b96573183f9ab961c180

add screenshots to readme

view details

push time in 2 months

create barnchaligg/flexi-form

branch : master

created branch time in 2 months

created repositoryaligg/flexi-form

Render form in a react app, conditionally rendering fields based on input data

created time in 2 months

startedEricaTess/covid-app

started time in 2 months

more