/ /   T h i s   a r r a y   h o l d s   t h e   " f r i e n d l y "   d a y   n a m e s 
 
 v a r   d a y _ n a m e s   =   n e w   A r r a y ( 7 ) 
 
 d a y _ n a m e s [ 0 ]   =   " S u n d a y " 
 
 d a y _ n a m e s [ 1 ]   =   " M o n d a y " 
 
 d a y _ n a m e s [ 2 ]   =   " T u e s d a y " 
 
 d a y _ n a m e s [ 3 ]   =   " W e d n e s d a y " 
 
 d a y _ n a m e s [ 4 ]   =   " T h u r s d a y " 
 
 d a y _ n a m e s [ 5 ]   =   " F r i d a y " 
 
 d a y _ n a m e s [ 6 ]   =   " S a t u r d a y " 
 
 
 
 / /   T h i s   a r r a y   h o l d s   t h e   " f r i e n d l y "   m o n t h   n a m e s 
 
 v a r   m o n t h _ n a m e s   =   n e w   A r r a y ( 1 2 ) 
 
 m o n t h _ n a m e s [ 0 ]   =   " J a n u a r y " 
 
 m o n t h _ n a m e s [ 1 ]   =   " F e b r u a r y " 
 
 m o n t h _ n a m e s [ 2 ]   =   " M a r c h " 
 
 m o n t h _ n a m e s [ 3 ]   =   " A p r i l " 
 
 m o n t h _ n a m e s [ 4 ]   =   " M a y " 
 
 m o n t h _ n a m e s [ 5 ]   =   " J u n e " 
 
 m o n t h _ n a m e s [ 6 ]   =   " J u l y " 
 
 m o n t h _ n a m e s [ 7 ]   =   " A u g u s t " 
 
 m o n t h _ n a m e s [ 8 ]   =   " S e p t e m b e r " 
 
 m o n t h _ n a m e s [ 9 ]   =   " O c t o b e r " 
 
 m o n t h _ n a m e s [ 1 0 ]   =   " N o v e m b e r " 
 
 m o n t h _ n a m e s [ 1 1 ]   =   " D e c e m b e r " 
 
 
 
 / /   G e t   t h e   c u r r e n t   d a t e 
 
 d a t e _ n o w   =   n e w   D a t e ( ) 
 
 
 
 / /   F i g u r e   o u t   t h e   f r i e n d l y   d a y   n a m e 
 
 d a y _ v a l u e   =   d a t e _ n o w . g e t D a y ( ) 
 
 d a t e _ t e x t   =   d a y _ n a m e s [ d a y _ v a l u e ] 
 
 
 
 / /   A d d   t h e   d a y   o f   t h e   m o n t h 
 
 d a t e _ t e x t   + =   " ,   "   +   d a t e _ n o w . g e t D a t e ( ) 
 
 
 
 / /   F i g u r e   o u t   t h e   f r i e n d l y   m o n t h   n a m e 
 
 m o n t h _ v a l u e   =   d a t e _ n o w . g e t M o n t h ( ) 
 
 d a t e _ t e x t   + =   "   "   +   m o n t h _ n a m e s [ m o n t h _ v a l u e ] 
 
 
 
 / /   A d d   t h e   y e a r 
 
 / / d a t e _ t e x t   + =   " ,   "   +   d a t e _ n o w . g e t F u l l Y e a r ( ) 
 
 
 
 / /   G e t   t h e   m i n u t e s   i n   t h e   h o u r 
 
 m i n u t e _ v a l u e   =   d a t e _ n o w . g e t M i n u t e s ( ) 
 
 i f   ( m i n u t e _ v a l u e   <   1 0 )   { 
 
         m i n u t e _ v a l u e   =   " 0 "   +   m i n u t e _ v a l u e 
 
 } 
 
 
 
 / /   G e t   t h e   h o u r   v a l u e   a n d   u s e   i t   t o   c u s t o m i z e   t h e   g r e e t i n g 
 
 h o u r _ v a l u e   =   d a t e _ n o w . g e t H o u r s ( ) 
 
 i f   ( h o u r _ v a l u e   = =   0 )   { 
 
       g r e e t i n g   =   " G o o d   m o r n i n g ,   " 
 
       t i m e _ t e x t   =   "     "   +   ( h o u r _ v a l u e   +   1 2 )   +   " : "   +   m i n u t e _ v a l u e   +   "   A M " 
 
 } 
 
 e l s e   i f   ( h o u r _ v a l u e   <   1 2 )   { 
 
         g r e e t i n g   =   " G o o d   m o r n i n g ! " 
 
         t i m e _ t e x t   =   "     "   +   h o u r _ v a l u e   +   " : "   +   m i n u t e _ v a l u e   +   "   A M " 
 
 } 
 
 e l s e   i f   ( h o u r _ v a l u e   = =   1 2 )   { 
 
         g r e e t i n g   =   " G o o d   a f t e r n o o n ! " 
 
         t i m e _ t e x t   =   "   a t   "   +   h o u r _ v a l u e   +   " : "   +   m i n u t e _ v a l u e   +   "   P M " 
 
 } 
 
 e l s e   i f   ( h o u r _ v a l u e   <   1 7 )   { 
 
         g r e e t i n g   =   " G o o d   a f t e r n o o n ! " 
 
         t i m e _ t e x t   =   "     "   +   ( h o u r _ v a l u e   -   1 2 )   +   " : "   +   m i n u t e _ v a l u e   +   "   P M " 
 
 } 
 
 e l s e   { 
 
         g r e e t i n g   =   " G o o d   e v e n i n g ! " 
 
         t i m e _ t e x t   =   "     "   +   ( h o u r _ v a l u e   -   1 2 )   +   " : "   +   m i n u t e _ v a l u e   +   "   P M " 
 
 } 
 
 
 
 d o c u m e n t . w r i t e ( " "   +   d a t e _ t e x t ) 
 
 