Choices to shape your future. Choose from a wide variety of graduate and professional programs, from optometry and health professions to education, writing and social work. Become a leader in healthcare with Pacific University's wide selection of health professions programs.
GetComponent() is a Unity method from the MonoBehaviour class that is used to access data on other components. To fully understand how this method works, you have to wrap your head around a few different concepts.
Date.parse should work for your parsing needs, but it returns number of milliseconds, so you need to wrap a Date constructor around it: (date.getMonth and date.getDate are 0-indexed instead of 1-indexed.). Fiddle: http://jsfiddle.net/GyC3t/. EDIT Thanks to JoeB's catch, let me do a correction. The date.getMonth() function is 0-indexed, but the date.getDate() function is 1-indexed.