Contents:

 

 

Introduction


News blog


What is Servoy?


Getting Started


Comparison Servoy/VFP


Performance


How-To's

 

Code Reference

 

VFP2Servoy Toolkit

 

 

Contact / feedback

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMONTH() - globals.CMONTH()



Returns the name of the month from a given date or DateTime expression.

 

VFP code example

d = DATE(2072,10,15)
? CMONTH(d)      // October

 

Servoy code example

utils.stringFormat('%tB', new Array(new Date(2072,9,15)))

// OR using the CMONTH() function alternative:

var d = new Date(2072,9,15)              // MONTH 9 = OCTOBER  !!
application.output(globals.CMONTH(d))      // October/oktober

Note: CMONTH() is a function of the VFP2Servoy Toolkit

 

Conclusion:

This function actually works better than it does in Visual FoxPro because it returns the day of week in the current Locale whereas VFP returns it in English only. The only pain is in the fact that the Date() function in Servoy/JavaScript has the crazy logic that the first month (January) is 0 and the first day is 1?! Better add a DATE() function as well.

External resources:

 

vfp plugin

 

ServoyWorld 2012 pics

 

Official Servoy website

 

Ken Levy on Servoy

 

Servoy info

 

Servoy Forum

 

Servoy Documentation

 

VisualFoxpro.com © 2010-2012 • All rights reserved • Contact: info@visualfoxpro.com